1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="rk2-compile">
|
---|
3 |
|
---|
4 | <target name="compile" depends="init,gs2-init">
|
---|
5 | <!-- checkout greenstone2 (or gsdl if a pre-2.84 release is being created) and gli -->
|
---|
6 | <if>
|
---|
7 | <bool>
|
---|
8 | <or>
|
---|
9 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
10 | </or>
|
---|
11 | </bool>
|
---|
12 | <exec executable="svn">
|
---|
13 | <arg value="checkout"/>
|
---|
14 | <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
|
---|
15 | <arg value="${basedir}/compiled"/>
|
---|
16 | </exec>
|
---|
17 | <else>
|
---|
18 | <exec executable="svn">
|
---|
19 | <arg value="checkout"/>
|
---|
20 | <arg value="${svn.root}/main/${branch.path}/gsdl"/>
|
---|
21 | <arg value="${basedir}/compiled"/>
|
---|
22 | </exec>
|
---|
23 | </else>
|
---|
24 | </if>
|
---|
25 |
|
---|
26 | <exec executable="svn">
|
---|
27 | <arg value="checkout"/>
|
---|
28 | <arg value="${svn.root}/main/${branch.path}/gli"/>
|
---|
29 | <arg value="${basedir}/compiled/gli"/>
|
---|
30 | </exec>
|
---|
31 |
|
---|
32 | <!-- drop in documentation -->
|
---|
33 | <copy todir="compiled" overwrite="true">
|
---|
34 | <fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
|
---|
35 | </copy>
|
---|
36 |
|
---|
37 | <!-- set version numbers -->
|
---|
38 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
|
---|
39 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
|
---|
40 |
|
---|
41 | <!-- we do not want the *.app folders if we are not mac-->
|
---|
42 | <if><bool><not><equals arg1="${rk.os}" arg2="mac"/></not></bool>
|
---|
43 | <delete dir="${basedir}/compiled/client-gli.app"/>
|
---|
44 | <delete dir="${basedir}/compiled/gems.app"/>
|
---|
45 | <delete dir="${basedir}/compiled/gs2-server.app"/>
|
---|
46 | <delete dir="${basedir}/compiled/gli.app"/>
|
---|
47 | </if>
|
---|
48 |
|
---|
49 | <!-- mac or linux: get the support library -->
|
---|
50 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
51 | <!-- checkout the gnome support library extension-->
|
---|
52 | <if><bool><or>
|
---|
53 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
54 | </or></bool>
|
---|
55 | <!-- Check out the pre-compiled version of the gnome-lib extension rather than compiling it from scratch -->
|
---|
56 | <echo>EXPORTING GNOME LIB EXTENSION</echo>
|
---|
57 | <exec executable="svn">
|
---|
58 | <arg value="export"/>
|
---|
59 | <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${os.shell}${arch}${extension-x64}.tar.gz"/>
|
---|
60 | <arg value="${basedir}/compiled/ext/gnome-lib-minimal-${os.shell}.tar.gz"/>
|
---|
61 | </exec>
|
---|
62 |
|
---|
63 | <exec executable="tar" dir="${basedir}/compiled/ext">
|
---|
64 | <arg value="xvzf"/>
|
---|
65 | <arg value="gnome-lib-minimal-${os.shell}.tar.gz"/>
|
---|
66 | </exec>
|
---|
67 |
|
---|
68 | <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
|
---|
69 | <arg value="-c"/>
|
---|
70 | <arg value="source devel.bash"/>
|
---|
71 | </exec>
|
---|
72 |
|
---|
73 | <echo>DONE EXTRACTING GNOME LIB EXTENSION</echo>
|
---|
74 | </if>
|
---|
75 | </if>
|
---|
76 |
|
---|
77 | <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
|
---|
78 | <!-- LD_LIBRARY_PATH is DYLD_LIBRARY_PATH on mac-->
|
---|
79 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
80 | <property name="libpathvar" value="DYLD_LIBRARY_PATH"/>
|
---|
81 | <else>
|
---|
82 | <property name="libpathvar" value="LD_LIBRARY_PATH"/>
|
---|
83 | </else>
|
---|
84 | </if>
|
---|
85 |
|
---|
86 | <property name="gnome.lib.dir" value="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}"/>
|
---|
87 | <property name="path.arg" value="PATH="${gnome.lib.dir}/bin:${env.PATH}""/>
|
---|
88 | <if><bool><equals arg1="${arch}" arg2="-ppc"/></bool>
|
---|
89 | <property name="cflags.arg" value="CFLAGS="-DSQLITE_ENABLE_LOCKING_STYLE=0 -I${gnome.lib.dir}/include""/>
|
---|
90 | <else>
|
---|
91 | <property name="cflags.arg" value="CFLAGS="-I${gnome.lib.dir}/include""/>
|
---|
92 | </else>
|
---|
93 | </if>
|
---|
94 | <property name="cxxflags.arg" value="CXXFLAGS="-I${gnome.lib.dir}/include""/>
|
---|
95 | <property name="cppflags.arg" value="CPPFLAGS="-I${gnome.lib.dir}/include""/>
|
---|
96 | <property name="ldflags.arg" value="LDFLAGS="-L${gnome.lib.dir}/lib""/>
|
---|
97 | <property name="pcpath.arg" value="PKG_CONFIG_PATH="${gnome.lib.dir}/lib/pkgconfig""/>
|
---|
98 | <property name="ldlpath.arg" value="${libpathvar}="${gnome.lib.dir}/lib""/>
|
---|
99 |
|
---|
100 | <property name="allargs" value="${path.arg} ${cflags.arg} ${cxxflags.arg} ${cppflags.arg} ${ldflags.arg} ${pcpath.arg} ${ldlpath.arg}"/>
|
---|
101 | </if>
|
---|
102 |
|
---|
103 | <!-- windows only -->
|
---|
104 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
105 |
|
---|
106 | <!-- unzip packages -->
|
---|
107 | <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
|
---|
108 |
|
---|
109 | <!-- unzip expat if the version is less that 2.84 -->
|
---|
110 | <if><bool><and>
|
---|
111 | <equals arg1="${post.2.83.version}" arg2="false"/>
|
---|
112 | </and></bool>
|
---|
113 | <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
|
---|
114 | </if>
|
---|
115 |
|
---|
116 | <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
|
---|
117 | <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
|
---|
118 | <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
|
---|
119 |
|
---|
120 | <!-- get winbin from tags if the version is greater than 2.83 otherwise get it from trunk -->
|
---|
121 | <if><bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
|
---|
122 | <if><bool><and>
|
---|
123 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
124 | </and></bool>
|
---|
125 |
|
---|
126 | <exec executable="svn">
|
---|
127 | <arg value="export"/>
|
---|
128 | <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
|
---|
129 | <arg value="${basedir}/compiled/bin/windows"/>
|
---|
130 | <arg value="-r"/>
|
---|
131 | <arg value="${branch.revision}"/>
|
---|
132 | </exec>
|
---|
133 |
|
---|
134 | <else>
|
---|
135 | <exec executable="svn">
|
---|
136 | <arg value="export"/>
|
---|
137 | <arg value="${svn.root}/main/trunk/binaries/windows/bin"/>
|
---|
138 | <arg value="${basedir}/compiled/bin/windows"/>
|
---|
139 | <arg value="-r"/>
|
---|
140 | <arg value="${branch.revision}"/>
|
---|
141 | </exec>
|
---|
142 | </else>
|
---|
143 | </if>
|
---|
144 | </if>
|
---|
145 |
|
---|
146 | <!-- insert windows perl -->
|
---|
147 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/bin/windows"/>
|
---|
148 |
|
---|
149 | <exec executable="${basedir}/compiled/bin/windows/gunzip.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
|
---|
150 | <arg value="-d"/>
|
---|
151 | <arg value="httpd-2.2.11-gs.tar.gz"/>
|
---|
152 | </exec>
|
---|
153 |
|
---|
154 | <exec executable="${basedir}/compiled/bin/windows/tar.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
|
---|
155 | <arg value="-xvf"/>
|
---|
156 | <arg value="httpd-2.2.11-gs.tar"/>
|
---|
157 | </exec>
|
---|
158 |
|
---|
159 | <!-- Insert a unique number after every occurrence of the word tempfile to prevent some strange race conditions present on Windows 7 (iuv = InsertUniqueValue) -->
|
---|
160 | <iuv>
|
---|
161 | <fileset dir="${basedir}/compiled/runtime-src/packages/apache-httpd/httpd-2.2.11" includes="**/*.mak"/>
|
---|
162 | <job pattern="tempfile"/>
|
---|
163 | </iuv>
|
---|
164 |
|
---|
165 | <!-- compile c code -->
|
---|
166 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec>
|
---|
167 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec>
|
---|
168 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec>
|
---|
169 | <delete><fileset dir="${basedir}/compiled/apache-httpd" includes="**/*.pdb"/></delete>
|
---|
170 |
|
---|
171 | <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/bin/Microsoft.VC80.CRT.manifest"/>
|
---|
172 | <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/lib/Microsoft.VC80.CRT.manifest"/>
|
---|
173 | <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/modules/Microsoft.VC80.CRT.manifest"/>
|
---|
174 | <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/bin/msvcr80.dll"/>
|
---|
175 | <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/lib/msvcr80.dll"/>
|
---|
176 | <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/modules/msvcr80.dll"/>
|
---|
177 |
|
---|
178 | <mkdir dir="products"/>
|
---|
179 | <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}${version-extra}.exe"/>
|
---|
180 | <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
|
---|
181 |
|
---|
182 |
|
---|
183 | <!-- linux only -->
|
---|
184 | <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
185 | <!-- add static to configure.in -->
|
---|
186 | <rsr file="${basedir}/compiled/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
|
---|
187 | <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure">
|
---|
188 | <arg value="configure.in"/>
|
---|
189 | </exec>
|
---|
190 |
|
---|
191 | <!-- set environment in packages/configure -->
|
---|
192 | <rsr file="${basedir}/compiled/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
193 | <rsr file="${basedir}/compiled/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
194 |
|
---|
195 | <!-- run configure -->
|
---|
196 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
|
---|
197 | <arg line="--enable-apache-httpd"/>
|
---|
198 | <arg line="${allargs}"/>
|
---|
199 | </exec>
|
---|
200 |
|
---|
201 | <!-- add -static to makefiles -->
|
---|
202 | <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
|
---|
203 | <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
|
---|
204 | <rsr file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static"/>
|
---|
205 |
|
---|
206 | <!-- mac only -->
|
---|
207 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
208 | <!-- run configure -->
|
---|
209 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
|
---|
210 | <arg line="--enable-apache-httpd"/>
|
---|
211 | <arg line="${allargs}"/>
|
---|
212 | </exec>
|
---|
213 |
|
---|
214 | <!-- tweak makefiles -->
|
---|
215 | <rsr file="${basedir}/compiled/runtime-src/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
|
---|
216 | <rsr file="${basedir}/compiled/runtime-src/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
|
---|
217 |
|
---|
218 | </if></else></if></else></if>
|
---|
219 |
|
---|
220 | <!-- mac and linux: compile -->
|
---|
221 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
222 | <!-- make -->
|
---|
223 | <exec dir="${basedir}/compiled" executable="make" failonerror="true">
|
---|
224 | <arg line="${ldlpath.arg}"/>
|
---|
225 | </exec>
|
---|
226 |
|
---|
227 | <!-- make install -->
|
---|
228 | <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
|
---|
229 |
|
---|
230 | <!-- make apache-for-dist -->
|
---|
231 | <!--<exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec>-->
|
---|
232 |
|
---|
233 | <!-- strip executables -->
|
---|
234 | <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true">
|
---|
235 | <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} ;"/>
|
---|
236 | </exec>
|
---|
237 | </if>
|
---|
238 |
|
---|
239 | <!-- Delete the entire gnome support library on Linux -->
|
---|
240 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
241 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
|
---|
242 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal-linux.tar.gz"/>
|
---|
243 | </if>
|
---|
244 |
|
---|
245 | <!-- Delete all but the lib folder and the setup.bash script of the gnome support library on Mac -->
|
---|
246 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
247 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
|
---|
248 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
|
---|
249 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
|
---|
250 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
|
---|
251 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
|
---|
252 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
|
---|
253 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
|
---|
254 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal-darwin.tar.gz"/>
|
---|
255 | </if>
|
---|
256 |
|
---|
257 | <!-- insert the necessary additional xml parser versions-->
|
---|
258 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
259 | <!-- Add the 5.6 version if necessary -->
|
---|
260 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.6"/></not></bool>
|
---|
261 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
262 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.6,perl-5.6/**/*"/>
|
---|
263 | </copy>
|
---|
264 | </if>
|
---|
265 |
|
---|
266 | <!-- Add the 5.8 version if necessary -->
|
---|
267 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8"/></not></bool>
|
---|
268 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
269 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8,perl-5.8/**/*"/>
|
---|
270 | </copy>
|
---|
271 | </if>
|
---|
272 |
|
---|
273 | <!-- Add the 5.10 version if necessary -->
|
---|
274 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.10"/></not></bool>
|
---|
275 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
276 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.10,perl-5.10/**/*"/>
|
---|
277 | </copy>
|
---|
278 | </if>
|
---|
279 | </if>
|
---|
280 |
|
---|
281 | <!-- compile gli -->
|
---|
282 | <!-- (linux and mac) -->
|
---|
283 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
284 | <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makegli.sh"/></exec>
|
---|
285 | <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makejar.sh"/></exec>
|
---|
286 | <!-- windows -->
|
---|
287 | <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
288 | <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makegli.bat"/></exec>
|
---|
289 | <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makejar.bat"/></exec>
|
---|
290 | </if></else></if>
|
---|
291 |
|
---|
292 | <delete dir="compiled/gli/jar"/>
|
---|
293 | <delete dir="compiled/gli/classes/org"/>
|
---|
294 | <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/>
|
---|
295 |
|
---|
296 | <!-- compile uninstaller -->
|
---|
297 | <antcall target="insert-and-compile-uninstaller" />
|
---|
298 |
|
---|
299 | <!-- build demo collection -->
|
---|
300 | <!-- the envs on these execs simulate the environment when you run setup.bat -->
|
---|
301 | <if>
|
---|
302 | <bool>
|
---|
303 | <equals arg1="${rk.os}" arg2="windows"/>
|
---|
304 | </bool>
|
---|
305 |
|
---|
306 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
|
---|
307 | <arg line="-S"/>
|
---|
308 | <arg line="bin/script/import.pl demo"/>
|
---|
309 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
310 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
311 | <env key="GSDLOS" value="windows"/>
|
---|
312 | <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
313 | </exec>
|
---|
314 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
|
---|
315 | <arg line="-S"/>
|
---|
316 | <arg line="bin/script/buildcol.pl demo"/>
|
---|
317 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
318 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
319 | <env key="GSDLOS" value="windows"/>
|
---|
320 | <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
321 | </exec>
|
---|
322 |
|
---|
323 | <delete dir="${basedir}/compiled/collect/demo/index"/>
|
---|
324 | <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
|
---|
325 |
|
---|
326 | <else>
|
---|
327 | <echo file="${basedir}/compiled/buildscript.sh">
|
---|
328 | #!/bin/bash
|
---|
329 | source setup.bash
|
---|
330 | /usr/bin/perl -S ${basedir}/compiled/bin/script/full-rebuild.pl demo
|
---|
331 | </echo>
|
---|
332 | <chmod perm="755" file="${basedir}/compiled/buildscript.sh"/>
|
---|
333 | <exec dir="${basedir}/compiled" executable="/bin/bash">
|
---|
334 | <arg line="buildscript.sh"/>
|
---|
335 | </exec>
|
---|
336 | <delete file="${basedir}/compiled/buildscript.sh"/>
|
---|
337 | </else>
|
---|
338 | </if>
|
---|
339 |
|
---|
340 | <!-- delete the source code -->
|
---|
341 | <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete>
|
---|
342 | <delete dir="compiled/common-src"/>
|
---|
343 | <delete dir="compiled/build-src"/>
|
---|
344 | <delete dir="compiled/runtime-src"/>
|
---|
345 | <delete><fileset dir="compiled" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h,lib/**/*.a"/></delete>
|
---|
346 |
|
---|
347 | <!-- strip .svn working-copy dirs -->
|
---|
348 | <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
|
---|
349 |
|
---|
350 | <!-- create needed empty files -->
|
---|
351 | <mkdir dir="compiled/tmp"/>
|
---|
352 | <chmod dir="compiled/tmp" perm="a+rwx"/>
|
---|
353 | <echo file="compiled/etc/usage.txt"></echo>
|
---|
354 |
|
---|
355 | <!-- windows -->
|
---|
356 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
357 |
|
---|
358 | <!-- make a copy of server.exe in the root -->
|
---|
359 | <copy file="compiled/bin/windows/server.exe" tofile="compiled/server.exe"/>
|
---|
360 |
|
---|
361 | <!-- delete sourcecode -->
|
---|
362 | <delete dir="${binzip.dir}/common-src"/>
|
---|
363 | <delete dir="${binzip.dir}/build-src"/>
|
---|
364 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
365 |
|
---|
366 | <!-- create simple zipped binary distribution
|
---|
367 | <mkdir dir="distributions"/>
|
---|
368 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
369 | <copy todir="${binzip.dir}"><fileset dir="compiled"/></copy>
|
---|
370 | <delete><fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/></delete>
|
---|
371 | -->
|
---|
372 |
|
---|
373 | <!-- delete unneeded files -->
|
---|
374 | <delete dir="compiled/bin/linux" />
|
---|
375 | <delete><fileset dir="compiled" includes="*.bash,*.sh,*.csh,.gstermrc"/></delete>
|
---|
376 | <delete><fileset dir="compiled/gli" includes="*.sh,*4gs3.bat"/></delete>
|
---|
377 | <delete dir="compiled/autom4te.cache" />
|
---|
378 |
|
---|
379 | <!-- linux -->
|
---|
380 | <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
381 |
|
---|
382 | <!-- grab imagemagick and wv (if less than 2.84) binaries -->
|
---|
383 | <delete dir="compiled/bin/linux/imagemagick"/>
|
---|
384 |
|
---|
385 | <if><bool><or>
|
---|
386 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
387 | </or></bool>
|
---|
388 | <if><bool><equals arg1="${x64}" arg2="true"/></bool>
|
---|
389 | <exec executable="svn">
|
---|
390 | <arg value="export"/>
|
---|
391 | <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-linux-x64.tar.gz"/>
|
---|
392 | <arg value="compiled/ext/imagemagick-linux-x64.tar.gz"/>
|
---|
393 | </exec>
|
---|
394 |
|
---|
395 | <exec executable="tar" dir="compiled/ext">
|
---|
396 | <arg value="xvzf"/>
|
---|
397 | <arg value="imagemagick-linux-x64.tar.gz"/>
|
---|
398 | </exec>
|
---|
399 | <delete file="compiled/ext/imagemagick-linux-x64.tar.gz"/>
|
---|
400 | <else>
|
---|
401 | <exec executable="svn">
|
---|
402 | <arg value="export"/>
|
---|
403 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
|
---|
404 | <arg value="compiled/bin/linux/imagemagick"/>
|
---|
405 | </exec>
|
---|
406 | </else>
|
---|
407 | </if>
|
---|
408 | <else>
|
---|
409 | <delete dir="compiled/bin/linux/wv"/>
|
---|
410 | <exec executable="svn">
|
---|
411 | <arg value="export"/>
|
---|
412 | <arg value="${svn.root}/main/trunk/binaries/linux/imagemagick"/>
|
---|
413 | <arg value="compiled/bin/linux/imagemagick"/>
|
---|
414 | </exec>
|
---|
415 |
|
---|
416 | <exec executable="svn">
|
---|
417 | <arg value="export"/>
|
---|
418 | <arg value="${svn.root}/main/trunk/binaries/linux/wv"/>
|
---|
419 | <arg value="compiled/bin/linux/wv"/>
|
---|
420 | </exec>
|
---|
421 | </else>
|
---|
422 | </if>
|
---|
423 |
|
---|
424 | <!-- delete unneeded files -->
|
---|
425 | <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete>
|
---|
426 | <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
|
---|
427 | <delete><fileset dir="compiled" includes="*.bat"/></delete>
|
---|
428 | <delete dir="compiled/common-src/packages/windows"/>
|
---|
429 | <delete dir="compiled/common-src/indexers/packages/windows"/>
|
---|
430 |
|
---|
431 | <!-- mac -->
|
---|
432 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
433 | <!-- grab imagemagick and ghostscript binaries -->
|
---|
434 | <delete dir="compiled/bin/darwin/imagemagick"/>
|
---|
435 | <delete dir="compiled/bin/darwin/ghostscript"/>
|
---|
436 |
|
---|
437 | <if><bool><and>
|
---|
438 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
439 | </and></bool>
|
---|
440 |
|
---|
441 | <exec executable="svn">
|
---|
442 | <arg value="export"/>
|
---|
443 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
|
---|
444 | <arg value="compiled/bin/darwin/imagemagick"/>
|
---|
445 | </exec>
|
---|
446 |
|
---|
447 | <exec executable="svn">
|
---|
448 | <arg value="export"/>
|
---|
449 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
|
---|
450 | <arg value="compiled/bin/darwin/ghostscript"/>
|
---|
451 | </exec>
|
---|
452 |
|
---|
453 | <else>
|
---|
454 | <exec executable="svn">
|
---|
455 | <arg value="export"/>
|
---|
456 | <arg value="${svn.root}/main/trunk/binaries/mac/intel/imagemagick"/>
|
---|
457 | <arg value="compiled/bin/darwin/imagemagick"/>
|
---|
458 | </exec>
|
---|
459 |
|
---|
460 | <exec executable="svn">
|
---|
461 | <arg value="export"/>
|
---|
462 | <arg value="${svn.root}/main/trunk/binaries/mac/intel/ghostscript"/>
|
---|
463 | <arg value="compiled/bin/darwin/ghostscript"/>
|
---|
464 | </exec>
|
---|
465 | </else>
|
---|
466 | </if>
|
---|
467 |
|
---|
468 | <!-- delete unneeded files -->
|
---|
469 | <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,*.bat"/></delete>
|
---|
470 | <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
|
---|
471 | <delete dir="compiled/common-src/packages/windows"/>
|
---|
472 |
|
---|
473 | </if></else></if></else></if>
|
---|
474 |
|
---|
475 | <!-- delete unneeded files -->
|
---|
476 | <delete dir="compiled/uninstaller" />
|
---|
477 | <delete file="compiled/bin/java/SignedGatherer.jar" />
|
---|
478 |
|
---|
479 | <!-- tidy up gli -->
|
---|
480 | <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
481 |
|
---|
482 | <!-- mac and linux: insert export to cdrom package -->
|
---|
483 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
484 | <mkdir dir="compiled/bin/windows"/>
|
---|
485 | <get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/>
|
---|
486 |
|
---|
487 | <if><bool><and>
|
---|
488 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
489 | </and></bool>
|
---|
490 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
|
---|
491 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
|
---|
492 |
|
---|
493 | <else>
|
---|
494 | <get src="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
|
---|
495 | <get src="${svn.root}/main/trunk/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
|
---|
496 | </else>
|
---|
497 | </if>
|
---|
498 | </if>
|
---|
499 |
|
---|
500 | </target>
|
---|
501 |
|
---|
502 | </project>
|
---|