root/release-kits/wirk3/ant-scripts/operations-on-gs3home.xml @ 16631

Revision 16631, 10.1 KB (checked in by oranfry, 11 years ago)

changes afer splitting gsdl into common, build and runtime

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    <!-- these two, do we need tomcat and axis for compilation??-->
23    <!-- Create the binaries for windows distribution -->
24    <target name="prepare-windows" depends="init">
25        <antcall target="checkout-gs2build"/>
26        <antcall target="checkout-gli"/>
27        <antcall target="unzip-windows-packages"/>
28        <antcall target="unzip-windows-packages"/>
29        <antcall target="checkout-winbin"/>
30        <antcall target="get-perl-for-windows"/>
31    </target>
32 
33    <target name="build-windows" depends="init">
34        <antcall target="svnupdate-distribution"/>
35        <antcall target="update-winbin"/>
36        <antcall target="get-windows-binaries"/>
37        <antcall target="compile-gs2build"/>
38        <antcall target="compile-packages"/>
39    </target>
40
41   
42    <target name="create-distribution-1" depends="init" description="do all the initial downloading and setting up">
43       
44        <antcall target="checkout-gs2build"/>
45        <antcall target="checkout-gli"/>
46        <!--<delete file="${gli.home}/gli.bat"/>-->
47        <delete file="${gli.home}/gli.sh"/>
48        <delete file="${gli.home}/gems.bat"/>
49        <delete file="${gli.home}/gems.sh"/>
50       
51        <!-- <antcall target="unzip-windows-packages"/> do we need this? -->
52        <antcall target="prepare-tomcat"/>
53        <delete file="${packages.home}/apache-tomcat-5.5.12.zip"/>
54        <delete file="${packages.home}/apache-tomcat-5.5.12-compat.zip"/>
55        <antcall target="prepare-axis"/>
56        <delete file="${packages.home}/axis-bin-1_2_1.zip"/>
57       
58        <!-- delete old axis dir -->
59        <delete dir="${packages.home}/axis"/>
60        <mkdir dir="${web.home}/applet"/>
61        <mkdir dir="${web.home}/logs"/>
62        <antcall target="prepare-ant"/>
63        <delete file="${packages.home}/apache-ant-1.7.0-bin.zip"/>
64        <antcall target="prepare-collections"/>
65
66        <!-- get good XML-Parser - does this work? -->
67        <antcall target="get-xml-parser"/>
68       
69        <!-- documented collections -->
70        <antcall target="get-documented-collections"/>
71
72        <delete file="${basedir}/README-CVS.txt"/>
73        <delete file="${basedir}/TODO.txt"/>
74       
75        <!-- create extra directories necessary the releases -->
76        <mkdir dir="${gs2build.home}/source"/>
77
78        </target>
79
80    <target name="create-distribution-2" description="do all the compilation">
81        <!-- compile the java stuff -->
82        <antcall target="compile-web"/>
83        <antcall target="compile-packages-and-indexers-javaonly"/>
84        <antcall target="distclean-packages"/>
85        <antcall target="compile-core"/>
86        <antcall target="compile-gli"/>
87    </target>
88
89    <target name="create-distribution-3" depends="init" description="Do the rearranging of source code etc">
90
91        <!-- put gs2build source code in a tidy place -->
92        <move todir="${gs2build.home}/source/src" failonerror="false"><fileset dir="${gs2build.home}/src" defaultexcludes="no"/></move>
93        <move todir="${gs2build.home}/source/lib" failonerror="false"><fileset dir="${gs2build.home}/lib" defaultexcludes="no"/></move>
94        <move todir="${gs2build.home}/source/packages" failonerror="false"><fileset dir="${gs2build.home}/packages" defaultexcludes="no"/></move>
95        <move todir="${gs2build.home}/source/indexers" failonerror="false"><fileset dir="${gs2build.home}/indexers" defaultexcludes="no"/></move>
96        <move file="${gs2build.home}/win32.mak" tofile="${gs2build.home}/source/win32.mak"/>
97        <!--<move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/source/setup.bat"/>-->
98        <!--<move file="${gs2build.home}/win32cfg.h" tofile="${gs2build.home}/source/win32cfg.h"/>-->
99
100        <!-- clean up -->
101        <delete><fileset dir="${basedir}" includes="**/.svn"/></delete>
102        <delete><fileset dir="${basedir}" includes="*.sh"/></delete>
103        <delete><fileset dir="${basedir}/gli" includes="*.sh"/></delete>
104        <delete><fileset dir="${basedir}/gs2build" includes="*.sh"/></delete>
105        <delete><fileset dir="${basedir}/bin/script" includes="*.sh"/></delete>
106
107        <delete dir="${basedir}/build"/>
108        <delete dir="${basedir}/lib/jni"/>
109        <delete dir="${basedir}/dist-resources"/>
110        <delete dir="${basedir}/gs2build/source"/>
111
112        <delete>
113            <fileset dir="${gs2build.home}">
114                <include name="config*"/>
115                <include name="ac*"/>
116                <include name="install-sh"/>
117                <include name="setup.bash"/>
118                <include name="Makefile.in"/>
119            </fileset>
120        </delete>
121
122        <!-- generate modified build.xml file -->
123        <antcall target="run-xslt-binary"/>
124
125       
126    </target>
127
128    <!-- Supplementary targets -->
129    <target name="svnupdate-distribution" depends="init">
130        <antcall target="svnupdate-packages"/>
131        <antcall target="svnupdate-core"/>
132        <antcall target="svnupdate-gs2build"/>
133        <antcall target="svnupdate-web"/>
134    </target>
135
136    <target name="run-xslt-source" depends="init">
137        <xslt in="${basedir}/build.xml" out="${basedir}/dist-build.xml" style="${basedir}/dist-resources/convert-build-xml-source.xsl"/>
138    </target>
139 
140    <target name="run-xslt-binary" depends="init">
141        <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${wirk3.home}/greenstone3/xsl/convert-build-xml.xsl"/>
142    </target>
143
144    <target name="compile-packages-and-indexers-javaonly" depends="init">
145        <echo>Getting Indexer Jars</echo>
146        <!-- install the jar files -->
147        <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/mg/mg.jar" todir="${lib.jni}"/>
148        <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/mgpp/mgpp.jar" todir="${lib.jni}"/>
149        <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/lucene-gs/LuceneWrapper.jar" todir="${web.lib}"/>
150        <!-- javagdbm -->
151        <!-- install the jar file -->
152        <copy file="${basedir}/../../greenstone3/src/packages/javagdbm/javagdbm.jar" todir="${lib.jni}" />
153    </target>
154
155    <target name="delete-windows-files" depends="init" unless="current.os.iswindows">
156        <delete dir="${basedir}/winutil"/>
157        <delete>
158            <fileset dir="${lib.jni}" includes="*.dll"/>
159        </delete>
160    </target>
161
162    <target name="get-perl-for-windows" depends="init" if="current.os.iswindows">
163        <mkdir dir="${gs2build.home}/bin/windows"/>
164        <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip" dest="${gs2build.home}/bin/windows/perl-for-windows.zip" usetimestamp="true"/>
165        <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip" dest="${gs2build.home}/bin/windows"/>
166        <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
167    </target>
168
169    <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
170    <target name="get-documented-collections" depends="init">
171        <property name="collect.home" value="${basedir}/web/sites/localsite/collect"/>
172
173        <!--    <copy todir="${collect.home}/authen-e">
174          <fileset dir="${documented.collections.home}/authen-e"/>
175        </copy>
176        <copy todir="${collect.home}/bibliog1">
177          <fileset dir="${documented.collections.home}/bibliog1"/>
178        </copy>
179        <copy todir="${collect.home}/bibliogr">
180          <fileset dir="${documented.collections.home}/bibliogr"/>
181        </copy>
182        <copy todir="${collect.home}/dls-e">
183          <fileset dir="${documented.collections.home}/dls-e"/>
184        </copy>
185        <copy todir="${collect.home}/dspace-e">
186          <fileset dir="${documented.collections.home}/dspace-e"/>
187        </copy>
188        <copy todir="${collect.home}/gsarch-e">
189          <fileset dir="${documented.collections.home}/gsarch-e"/>
190        </copy>
191        <copy todir="${collect.home}/image-e">
192          <fileset dir="${documented.collections.home}/image-e"/>
193        </copy>
194        <copy todir="${collect.home}/isis-e">
195          <fileset dir="${documented.collections.home}/isis-e"/>
196        </copy>
197        <copy todir="${collect.home}/oai-e">
198          <fileset dir="${documented.collections.home}/oai-e"/>
199        </copy>
200        <copy todir="${collect.home}/pagedimg-e">
201          <fileset dir="${documented.collections.home}/pagedimg-e"/>
202        </copy>
203        <copy todir="${collect.home}/wrdpdf-e">
204          <fileset dir="${documented.collections.home}/wrdpdf-e"/>
205        </copy>
206
207        <copy todir="${collect.home}/garish">
208          <fileset dir="${documented.collections.home}/garish"/>
209        </copy>
210        <copy todir="${collect.home}/marcexam">
211          <fileset dir="${documented.collections.home}/marcexam"/>
212        </copy>
213        <copy todir="${collect.home}/style-e">
214          <fileset dir="${documented.collections.home}/style-e"/>
215        </copy>
216        <copy todir="${collect.home}/wiki">
217          <fileset dir="${documented.collections.home}/wiki"/>
218        </copy> -->
219    </target>
220
221    <target name="get-xml-parser" depends="init">
222        <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" usetimestamp="true"/>
223        <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/" compression="gzip"/>
224        <delete file="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"/>
225    </target>
226
227    <!-- new targets to go in distribution build.xml files -->
228
229    <!-- new usage target for binary release -->
230    <target name="usage-for-binary-dist" description="Print a help message">
231        <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
232        <echo message="  Execute 'ant -help' for Ant help."/>
233    </target>
234   
235    <!-- new install target for source distribution -->
236    <target name="install-for-source-dist" depends="init" description="install the source distribution. Includes configuring and compiling">
237        <antcall target="unzip-windows-packages"/>
238        <!-- do the java version dependent stuff -->
239        <antcall target="configure-java-version"/>
240        <antcall target="install-macos-extra"/>
241        <!-- set gsdlhome in setup.bat -->
242        <antcall target="gs2build-edit-setup-bat"/>
243        <antcall target="install-indexer-files"/>
244        <antcall target="configure"/>
245        <antcall target="configure-c++"/>
246        <antcall target="compile"/>
247        <!-- make sure we have execute permission for the .sh files -->
248        <chmod dir="${basedir}" perm="ugo+rx" includes="*.sh"/>
249    </target>
250   
251</project>
252 
Note: See TracBrowser for help on using the browser.