source: release-kits/wirk3/ant-scripts/operations-on-gs3home.xml@ 17471

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

component fixes

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