1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | ..........................................................
|
---|
5 | September 2007
|
---|
6 | Greenstone3 'release maker' script
|
---|
7 | Oran Fry
|
---|
8 | ..........................................................
|
---|
9 | -->
|
---|
10 |
|
---|
11 | <project name="lirk3-compile" default="compile">
|
---|
12 |
|
---|
13 |
|
---|
14 | <target name="compile">
|
---|
15 |
|
---|
16 | <!-- checkout -->
|
---|
17 | <addressedcall target="checkout-greenstone3" />
|
---|
18 |
|
---|
19 | <!-- preparation -->
|
---|
20 | <addressedcall target="set-version-number-property" />
|
---|
21 | <addressedcall target="dist-prepare-unix" />
|
---|
22 | <addressedcall target="tweak-configure-scripts" />
|
---|
23 |
|
---|
24 | <!-- update -->
|
---|
25 | <addressedcall target="dist-update-unix" />
|
---|
26 |
|
---|
27 | <!-- configure -->
|
---|
28 | <addressedcall target="dist-configure-unix" />
|
---|
29 | <addressedcall target="tweak-makefiles" />
|
---|
30 |
|
---|
31 | <!-- build -->
|
---|
32 | <addressedcall target="dist-build-unix" />
|
---|
33 | <addressedcall target="fix-wget" />
|
---|
34 | <addressedcall target="linux-strip-execs" />
|
---|
35 |
|
---|
36 | <!-- documentation -->
|
---|
37 | <addressedcall target="prepare-documentation" />
|
---|
38 |
|
---|
39 | </target>
|
---|
40 |
|
---|
41 |
|
---|
42 | <!--
|
---|
43 |
|
---|
44 | second level targets
|
---|
45 |
|
---|
46 | -->
|
---|
47 |
|
---|
48 | <target name="checkout-greenstone3">
|
---|
49 | <if><bool><istrue value="${execute}"/></bool>
|
---|
50 | <svn>
|
---|
51 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
|
---|
52 | </svn>
|
---|
53 | </if>
|
---|
54 | </target>
|
---|
55 |
|
---|
56 | <target name="set-version-number-property">
|
---|
57 | <if><bool><istrue value="${execute}"/></bool>
|
---|
58 | <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
|
---|
59 | </if>
|
---|
60 | </target>
|
---|
61 |
|
---|
62 | <target name="dist-prepare-unix">
|
---|
63 | <if><bool><istrue value="${execute}"/></bool>
|
---|
64 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/>
|
---|
65 | </if>
|
---|
66 | </target>
|
---|
67 | <target name="tweak-configure-scripts">
|
---|
68 | <addressedcall target="mgpp-add-static" />
|
---|
69 | <addressedcall target="mg-add-static" />
|
---|
70 | <addressedcall target="gs2buildextra-add-static" />
|
---|
71 | </target>
|
---|
72 |
|
---|
73 | <target name="dist-update-unix">
|
---|
74 | <if><bool><istrue value="${execute}"/></bool>
|
---|
75 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/>
|
---|
76 | </if>
|
---|
77 | </target>
|
---|
78 |
|
---|
79 | <target name="dist-configure-unix">
|
---|
80 | <if><bool><istrue value="${execute}"/></bool>
|
---|
81 | <exec dir="greenstone3/gs2build/gs2build-extra" executable="autoconf" output="greenstone3/gs2build/configure">
|
---|
82 | <arg line="configure.in"/>
|
---|
83 | </exec>
|
---|
84 | <chmod file="greenstone3/gs2build/configure" perm="+x"/>
|
---|
85 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
|
---|
86 | </if>
|
---|
87 | </target>
|
---|
88 |
|
---|
89 | <target name="tweak-makefiles">
|
---|
90 | <addressedcall target="wv-add-static" />
|
---|
91 | <addressedcall target="xlhtml-add-static" />
|
---|
92 | <addressedcall target="ppthtml-add-static" />
|
---|
93 | <addressedcall target="rtftohtml-add-static" />
|
---|
94 | <addressedcall target="gdbm-add-static" />
|
---|
95 | </target>
|
---|
96 |
|
---|
97 | <target name="dist-build-unix">
|
---|
98 | <if><bool><istrue value="${execute}"/></bool>
|
---|
99 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
|
---|
100 | </if>
|
---|
101 | </target>
|
---|
102 |
|
---|
103 | <target name="fix-wget">
|
---|
104 | <if><bool><istrue value="${execute}"/></bool>
|
---|
105 | <!-- fix this !!! -->
|
---|
106 | <delete file="greenstone3/gs2build/packages/wget/wget-1.9/src/wget"/>
|
---|
107 | </if>
|
---|
108 | </target>
|
---|
109 |
|
---|
110 | <target name="linux-strip-execs">
|
---|
111 | <if><bool><istrue value="${execute}"/></bool>
|
---|
112 | <exec dir="greenstone3/gs2build/bin/linux" executable="find">
|
---|
113 | <arg line="! -name . -exec strip {} ;"/>
|
---|
114 | </exec>
|
---|
115 | </if>
|
---|
116 | </target>
|
---|
117 |
|
---|
118 | <target name="prepare-documentation">
|
---|
119 | <if><bool><istrue value="${execute}"/></bool>
|
---|
120 | <mkdir dir="greenstone3/gsdl-manuals"/>
|
---|
121 | <svn>
|
---|
122 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
|
---|
123 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
|
---|
124 | </svn>
|
---|
125 | <javac srcdir="greenstone3/gsdl-manuals/shared"
|
---|
126 | destdir="greenstone3/gsdl-manuals/shared"
|
---|
127 | debug="on">
|
---|
128 | <include name="*.java"/>
|
---|
129 | </javac>
|
---|
130 | <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
|
---|
131 |
|
---|
132 | <path id="documentation.compile.classpath">
|
---|
133 | <fileset dir="greenstone3/gsdl-manuals">
|
---|
134 | <include name="**/*.jar"/>
|
---|
135 | </fileset>
|
---|
136 | <pathelement path="greenstone3/gsdl-manuals/shared"/>
|
---|
137 | <pathelement path="greenstone3/gsdl-manuals/manuals"/>
|
---|
138 | </path>
|
---|
139 |
|
---|
140 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
141 | <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
142 | <arg value="greenstone3/gli/help/en/help.xml" />
|
---|
143 | <arg value="greenstone3" />
|
---|
144 | </java>
|
---|
145 |
|
---|
146 | <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
147 | <echo>Run generate-pdf.sh</echo>
|
---|
148 | <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
|
---|
149 | <arg line="generate-pdf.sh u en" />
|
---|
150 | </exec>
|
---|
151 | </if>
|
---|
152 | </target>
|
---|
153 |
|
---|
154 |
|
---|
155 | <!--
|
---|
156 |
|
---|
157 | third level targets
|
---|
158 |
|
---|
159 | -->
|
---|
160 |
|
---|
161 | <target name="mgpp-add-static">
|
---|
162 | <if><bool><istrue value="${execute}"/></bool>
|
---|
163 | <rsr file="greenstone3/gs2build/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
164 | <exec dir="greenstone3/gs2build/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/indexers/mgpp/configure">
|
---|
165 | <arg line="configure.in"/>
|
---|
166 | </exec>
|
---|
167 | </if>
|
---|
168 | </target>
|
---|
169 | <target name="mg-add-static">
|
---|
170 | <if><bool><istrue value="${execute}"/></bool>
|
---|
171 | <rsr file="greenstone3/gs2build/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
172 | <exec dir="greenstone3/gs2build/indexers/mg" executable="autoconf" output="greenstone3/gs2build/indexers/mg/configure">
|
---|
173 | <arg line="configure.in"/>
|
---|
174 | </exec>
|
---|
175 | </if>
|
---|
176 | </target>
|
---|
177 | <target name="gs2buildextra-add-static">
|
---|
178 | <if><bool><istrue value="${execute}"/></bool>
|
---|
179 | <rsr file="greenstone3/gs2build/gs2build-extra/packages.configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" />
|
---|
180 | <rsr file="greenstone3/gs2build/gs2build-extra/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
181 | </if>
|
---|
182 | </target>
|
---|
183 |
|
---|
184 | <target name="wv-add-static">
|
---|
185 | <if><bool><istrue value="${execute}"/></bool>
|
---|
186 | <rsr file="greenstone3/gs2build/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
187 | </if>
|
---|
188 | </target>
|
---|
189 | <target name="xlhtml-add-static">
|
---|
190 | <if><bool><istrue value="${execute}"/></bool>
|
---|
191 | <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
192 | </if>
|
---|
193 | </target>
|
---|
194 | <target name="ppthtml-add-static">
|
---|
195 | <if><bool><istrue value="${execute}"/></bool>
|
---|
196 | <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
197 | </if>
|
---|
198 | </target>
|
---|
199 | <target name="rtftohtml-add-static">
|
---|
200 | <if><bool><istrue value="${execute}"/></bool>
|
---|
201 | <rsr file="greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml.{2}EXEEXT.{1}" replacement="-o rtftohtml\$(EXEEXT) -static" />
|
---|
202 | </if>
|
---|
203 | </target>
|
---|
204 | <target name="gdbm-add-static">
|
---|
205 | <if><bool><istrue value="${execute}"/></bool>
|
---|
206 | <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
|
---|
207 | </if>
|
---|
208 | </target>
|
---|
209 |
|
---|
210 |
|
---|
211 |
|
---|
212 | </project>
|
---|