root/release-kits/lirk3/ant-scripts/operations-on-gs3home.xml @ 18847

Revision 18847, 10.0 KB (checked in by oranfry, 11 years ago)

deleting traces of links to /home/nzdl, having installer create gsdlsite.cfg, changes to cdrk2

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