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

Last change on this file since 14982 was 14982, checked in by oranfry, 14 years ago

initial import of LiRK3

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