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