source: release-kits/lirk3/ant-scripts/operations-on-gs3home.xml@ 17268

Last change on this file since 17268 was 16736, checked in by oranfry, 13 years ago

changes to lirk3 after ant hack cleaned up

File size: 11.7 KB
Line 
1<?xml version="1.0"?>
2<project name="opeations-on-gs3home">
3
4 <!-- include standard build file -->
5 <import file="${basedir}/build.xml"/>
6
7 <property name="documented.collections.home" value="/home/nzdl/for-distributions/collect"/>
8 <property name="greenstone3-change-date" value="Tue Feb 20 12:13:42 NZDT 2007"/>
9 <property name="gs2build-change-date" value="Wed Dec 13 10:35:57 NZDT 2006"/>
10
11 <!-- ====================== DISTRIBUTION Targets ========================= -->
12
13 <!-- Create the binaries for Unix/Mac distributions -->
14 <target name="prepare-unix" depends="init">
15 <antcall target="checkout-gs2build"/>
16 <antcall target="checkout-gli"/>
17 </target>
18
19 <target name="update-unix" depends="init">
20 <antcall target="svnupdate-distribution"/>
21 <antcall target="delete-windows-files"/>
22 </target>
23
24 <target name="configure-unix" depends="init">
25 <antcall target="configure-c++"/>
26 </target>
27 <target name="build-unix" depends="init">
28 <antcall target="compile-packages"/>
29 <antcall target="compile-gs2build"/>
30 </target>
31
32
33 <target name="tester-abc">
34 <echo>tester ABC</echo>
35 </target>
36
37 <!-- creates the base distribution. Needs binaries copied in to it from other greenstones (prepare-os targets) -->
38 <target name="create-distribution-1" depends="init" description="do all the initial downloading and setting up">
39
40 <echo>checkout gs2build</echo>
41 <antcall target="checkout-gs2build"/>
42 <echo>done checking out gs2build</echo>
43
44
45 <!--
46 gli is now checked out by create-distribution.xml
47 so it already exists
48 <antcall target="checkout-gli"/>
49 -->
50
51 <delete><fileset dir="." includes="*.bat"/></delete>
52 <!--<delete file="${gli.home}/gli.sh"/>-->
53 <delete file="${gli.home}/gems.sh"/>
54 <delete dir="${gs2build.home}/gs2build-extra"/>
55
56 <antcall target="prepare-tomcat"/>
57 <delete file="${packages.home}/apache-tomcat-5.5.25.zip"/>
58 <delete file="${packages.home}/apache-tomcat-5.5.25-compat.zip"/>
59
60 <antcall target="prepare-axis"/>
61 <delete file="${packages.home}/axis-bin-1_2_1.zip"/>
62
63 <!-- delete old axis dir -->
64 <delete dir="${packages.home}/axis"/>
65 <mkdir dir="${web.home}/applet"/>
66 <mkdir dir="${web.home}/logs"/>
67 <antcall target="prepare-ant"/>
68 <delete file="${packages.home}/apache-ant-1.7.0-bin.zip"/>
69 <antcall target="prepare-collections"/>
70
71 <!-- get good XML-Parser - does this work? -->
72 <antcall target="get-xml-parser"/>
73
74 <!-- documented collections -->
75 <antcall target="get-documented-collections"/>
76
77 <delete file="${basedir}/README-CVS.txt"/>
78 <delete file="${basedir}/TODO.txt"/>
79
80 <!-- make the extra directories needed for a release -->
81 <!--<mkdir dir="${basedir}/Linux/lib/jni"/>
82 <mkdir dir="${gs2build.home}/Unix/bin/linux"/>-->
83
84 </target>
85
86 <target name="create-distribution-2" description="do all the compilation">
87
88 <!-- compile the java stuff -->
89 <antcall target="compile-web"/>
90 <antcall target="configure-tomcat"/>
91 <antcall target="configure-packages-and-indexers"/>
92 <antcall target="compile-packages-and-indexers-javaonly"/>
93 <antcall target="distclean-packages"/>
94 <antcall target="compile-core"/>
95 <antcall target="compile-gli"/>
96
97 </target>
98
99 <target name="create-distribution-3" depends="init" description="Do the rearranging of source code and others">
100
101 <!-- delete some source files -->
102 <delete dir="${gs2build.home}/source/src"/>
103 <delete dir="${gs2build.home}/source/lib"/>
104 <delete dir="${gs2build.home}/source/packages"/>
105 <delete dir="${gs2build.home}/source/indexers"/>
106
107 <!-- generate modified build.xml file -->
108 <antcall target="run-xslt-binary"/>
109
110 <!-- clean up -->
111 <delete><fileset dir="${basedir}" includes="**/.svn"/></delete>
112
113 <delete><fileset dir="${basedir}" includes="*.bat"/></delete>
114 <delete><fileset dir="${basedir}/gli" includes="*.bat"/></delete>
115 <delete><fileset dir="${basedir}/gs2build" includes="*.bat"/></delete>
116 <delete><fileset dir="${basedir}/bin/script" includes="*.bat"/></delete>
117
118 <delete dir="${basedir}/build"/>
119 <delete dir="${basedir}/lib/jni"/>
120 <delete dir="${basedir}/winutil"/>
121 <delete dir="${basedir}/dist-resources"/>
122 <delete dir="${basedir}/gs2build/source"/>
123
124 <delete file="${basedir}/gs2build/WIN32cfg.h"/>
125 <delete file="${basedir}/gs2build/win32.mak"/>
126
127 </target>
128
129 <!-- Supplementary targets -->
130
131 <target name="svnupdate-distribution" depends="init">
132 <antcall target="svnupdate-packages"/>
133 <antcall target="svnupdate-core"/>
134 <antcall target="svnupdate-gs2build"/>
135 <antcall target="svnupdate-web"/>
136 </target>
137
138 <target name="run-xslt-binary" depends="init">
139 <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${lirk3.home}/greenstone3/xsl/convert-build-xml.xsl"/>
140 </target>
141
142 <target name="run-xslt-source" depends="init">
143 <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${lirk3.home}/greenstone3/xsl/convert-build-xml-source.xsl"/>
144 </target>
145
146 <target name="configure-packages-and-indexers" depends="init">
147 <exec executable="${indexers.home}/configure"
148 dir="${indexers.home}">
149 <arg value="--prefix=${basedir}"/>
150 <arg value="--libdir=${lib.jni}"/>
151 </exec>
152 <exec executable="${javagdbm.home}/configure"
153 dir="${javagdbm.home}">
154 <arg value="--prefix=${basedir}"/>
155 <arg value="--libdir=${lib.jni}"/>
156 </exec>
157
158 </target>
159
160 <target name="compile-packages-and-indexers-javaonly" depends="init">
161 <echo>Compiling Indexers</echo>
162 <exec executable="make" os="${os.unix}"
163 dir="${indexers.home}">
164 <arg value="javaonly"/>
165 </exec>
166 <exec executable="make" os="${os.unix}"
167 dir="${indexers.home}">
168 <arg value="install-javaonly"/>
169 </exec>
170 <!-- install the jar files -->
171 <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
172 <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
173 <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
174
175 <!-- javagdbm -->
176 <exec executable="make" os="${os.unix}"
177 dir="${javagdbm.home}">
178 <arg value="javaonly"/>
179 </exec>
180 <exec executable="make" os="${os.unix}"
181 dir="${javagdbm.home}">
182 <arg value="installjava"/>
183 </exec>
184 <!-- install the jar file -->
185 <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
186
187 </target>
188
189 <target name="delete-windows-files" depends="init" unless="current.os.iswindows">
190 <delete dir="${basedir}/winutil"/>
191 <delete>
192 <fileset dir="${lib.jni}" includes="*.dll"/>
193 </delete>
194 </target>
195
196 <target name="get-perl-for-windows" depends="init" if="current.os.iswindows">
197 <mkdir dir="${gs2build.home}/bin/windows"/>
198 <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip"
199 dest="${gs2build.home}/bin/windows/perl-for-windows.zip"
200 usetimestamp="true"/>
201 <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip"
202 dest="${gs2build.home}/bin/windows"/>
203 <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
204 </target>
205
206 <target name="distclean-packages" depends="init">
207 <!-- indexers : just call the make target -->
208 <exec executable="make" os="${os.unix}"
209 dir="${indexers.home}">
210 <arg value="distclean"/>
211 </exec>
212 <!-- javagdbm -->
213 <exec executable="make" os="${os.unix}"
214 dir="${javagdbm.home}">
215 <arg value="distclean"/>
216 </exec>
217 </target>
218
219 <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
220 <target name="get-documented-collections" depends="init">
221 <property name="collect.home" value="${basedir}/web/sites/localsite/collect"/>
222
223<!-- <copy todir="${collect.home}/authen-e">
224 <fileset dir="${documented.collections.home}/authen-e"/>
225 </copy>
226 <copy todir="${collect.home}/bibliog1">
227 <fileset dir="${documented.collections.home}/bibliog1"/>
228 </copy>
229 <copy todir="${collect.home}/bibliogr">
230 <fileset dir="${documented.collections.home}/bibliogr"/>
231 </copy>
232 <copy todir="${collect.home}/dls-e">
233 <fileset dir="${documented.collections.home}/dls-e"/>
234 </copy>
235 <copy todir="${collect.home}/dspace-e">
236 <fileset dir="${documented.collections.home}/dspace-e"/>
237 </copy>
238 <copy todir="${collect.home}/gsarch-e">
239 <fileset dir="${documented.collections.home}/gsarch-e"/>
240 </copy>
241 <copy todir="${collect.home}/image-e">
242 <fileset dir="${documented.collections.home}/image-e"/>
243 </copy>
244 <copy todir="${collect.home}/isis-e">
245 <fileset dir="${documented.collections.home}/isis-e"/>
246 </copy>
247 <copy todir="${collect.home}/oai-e">
248 <fileset dir="${documented.collections.home}/oai-e"/>
249 </copy>
250 <copy todir="${collect.home}/pagedimg-e">
251 <fileset dir="${documented.collections.home}/pagedimg-e"/>
252 </copy>
253 <copy todir="${collect.home}/wrdpdf-e">
254 <fileset dir="${documented.collections.home}/wrdpdf-e"/>
255 </copy>
256
257 <copy todir="${collect.home}/garish">
258 <fileset dir="${documented.collections.home}/garish"/>
259 </copy>
260 <copy todir="${collect.home}/marcexam">
261 <fileset dir="${documented.collections.home}/marcexam"/>
262 </copy>
263 <copy todir="${collect.home}/style-e">
264 <fileset dir="${documented.collections.home}/style-e"/>
265 </copy>
266 <copy todir="${collect.home}/wiki">
267 <fileset dir="${documented.collections.home}/wiki"/>
268 </copy> -->
269 </target>
270
271 <target name="get-xml-parser" depends="init">
272 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" usetimestamp="true"/>
273 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/" compression="gzip"/>
274 <delete file="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"/>
275 </target>
276
277<!-- <target name="create-changelog"> -->
278 <!-- generate greenstone 3 changelog -->
279<!-- <exec executable="/home/nzdl/for-distributions/bin/script/cvs2cl.pl"
280 dir="${basedir}">
281 <arg value="-P"/>
282 <arg value="-F"/>
283 <arg value="trunk"/>
284 <arg value="-r"/>
285 <arg value="-S"/>
286 <arg value="-l"/>
287 <arg value="-d'${greenstone3-change-date}&lt;tomorrow'"/>
288 <arg value="-f"/>
289 <arg value="greenstone-${app.version}-ChangeLog.txt"/>
290 <arg value="-I"/>
291 <arg value="gli/.*|gs2build/.*"/>
292 </exec> -->
293 <!-- generate coll building change log -->
294<!-- <exec executable="/home/nzdl/for-distributions/bin/script/cvs2cl.pl"
295 dir="${basedir}">
296 <arg value="-P"/>
297 <arg value="-F"/>
298 <arg value="trunk"/>
299 <arg value="-r"/>
300 <arg value="-S"/>
301 <arg value="-l"/>
302 <arg value="-d'${gs2build-change-date}&lt;tomorrow'"/>
303 <arg value="-f"/>
304 <arg value="greenstone-${app.version}-ChangeLog-collbuilding.txt"/>
305 <arg value="gli"/>
306 <arg value="gs2build"/>
307 </exec>
308 </target> -->
309
310
311 <!-- new targets to go in distribution build.xml files -->
312
313 <!-- new usage target for binary release -->
314 <target name="usage-for-binary-dist" description="Print a help message">
315 <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
316 <echo message=" Execute 'ant -help' for Ant help."/>
317 </target>
318
319
320 <!-- new install target for source distribution -->
321 <target name="install-for-source-dist" depends="init" description="install the source distribution. Includes configuring and compiling">
322 <antcall target="unzip-windows-packages"/>
323 <!-- do the java version dependent stuff -->
324 <antcall target="configure-java-version"/>
325 <antcall target="install-macos-extra"/>
326 <!-- set gsdlhome in setup.bat -->
327 <antcall target="gs2build-edit-setup-bat"/>
328 <antcall target="install-indexer-files"/>
329 <antcall target="configure"/>
330 <antcall target="configure-c++"/>
331 <antcall target="compile"/>
332 <!-- make sure we have execute permission for the .sh files -->
333 <chmod dir="${basedir}" perm="ugo+rx"
334 includes="*.sh"/>
335
336 </target>
337
338</project>
Note: See TracBrowser for help on using the repository browser.