source: main/trunk/release-kits/kits/rk3/ant-scripts/lin64-compile.xml@ 32973

Last change on this file since 32973 was 32973, checked in by sjm84, 5 years ago

Unused compile.xml file documenting linux64-specific changes for generating rk3 release bins.

File size: 14.3 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk3-compile">
3
4 <target name="compile">
5
6 <!-- checkout greenstone3 -->
7 <exec executable="svn">
8 <arg value="checkout"/>
9 <arg value="${svn.root}/main/${branch.path}/greenstone3"/>
10 <arg value="compiled"/>
11 <arg value="-r"/><arg value="${branch.revision}"/>
12 </exec>
13
14 <if><bool><equals arg1="${with.jni}" arg2="false"/></bool>
15 <rsr file="${basedir}/compiled/build.properties.svn" pattern="with.jni=true" replacement="#with.jni=true"/>
16 </if>
17
18 <if><bool><equals arg1="${with.gli.and.gems}" arg2="false"/></bool>
19 <rsr file="${basedir}/compiled/build.properties.svn" pattern="with.gli.and.gems=true" replacement="#with.gli.and.gems=true"/>
20 </if>
21
22 <!-- make sure all c++ compilation is done statically on linux -->
23 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
24 <property name="forward.compile.static" value="true"/>
25 </if>
26
27 <!-- make sure the c++ compilation can see the support library in the extension folder -->
28 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
29 <property name="forward.use.gnomelib.ext" value="true"/>
30 </if>
31
32 <antcall target="persist-forwarded-properties">
33 <param name="greenstone3basedir" value="compiled"/>
34 </antcall>
35
36 <!-- run greenstone3's ant prepare -->
37 <ant dir="compiled" inheritAll="false">
38 <target name="prepare"/>
39 <propertyset refid="forward.properties"/>
40 <property name="properties.accepted" value="true"/>
41 </ant>
42
43 <!-- set all version numbers -->
44 <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
45 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
46 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
47
48 <!-- mac or linux: compile the support library -->
49 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
50 <!-- checkout the gnome support library extension-->
51
52 <!-- For Lions, need a specific gnome-lib-minimal tar file. The file name contains darwin12 for Lion, it contains the os.shell name (darwin/linux) for other cases.
53 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) -->
54 <condition property="specific.os.type" value="${os.shell}-Lion" else="${os.shell}">
55 <and>
56 <contains string="${os.shell}" substring="darwin" casesensitive="false"/>
57 <matches pattern="^(10\.7\.[4-9]|10\.[8-9]|1[1-9]|[2-9])" string="${os.version}"/>
58 </and>
59 </condition>
60
61 <if><bool><or>
62 <equals arg1="${post.2.83.version}" arg2="true"/>
63 </or></bool>
64 <echo>EXPORTING GNOME LIB EXTENSION</echo>
65 <exec executable="svn">
66 <arg value="export"/>
67 <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${specific.os.type}${arch}${extension-x64}.tar.gz"/>
68 <arg value="${basedir}/compiled/ext/gnome-lib-${specific.os.type}.tar.gz"/>
69 </exec>
70
71 <exec executable="tar" dir="${basedir}/compiled/ext">
72 <arg value="xvzf"/>
73 <arg value="gnome-lib-${specific.os.type}.tar.gz"/>
74 </exec>
75
76 <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
77 <arg value="-c"/>
78 <arg value="source setup.bash_old &amp;&amp; source devel.bash"/>
79 </exec>
80 <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
81 </if>
82 </if>
83
84 <rsr file="${basedir}/compiled/build.xml" pattern="CFLAGS=&amp;quot;" replacement="CFLAGS=&amp;quot;-fPIC "/>
85
86
87 <!-- run greenstone3's ant install and ant dist-tidy -->
88 <ant dir="compiled" inheritAll="false">
89 <target name="install"/>
90 <target name="dist-tidy"/>
91 <propertyset refid="forward.properties"/>
92 <property name="properties.accepted" value="true"/>
93 <property name="properties.keep.src" value="${keep.src}"/>
94 </ant>
95
96 <!-- Delete all collections apart from the Lucene demo collection -->
97 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gberg"/>
98 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgdemo"/>
99 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgppdemo"/>
100 <delete dir="${basedir}/compiled/web/sites/localsite/collect/infomine"/>
101
102 <!-- Delete the entire gnome support library on Linux -->
103 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
104 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
105 <delete file="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
106 </if>
107
108 <!-- Delete all but the lib folder of the gnome support library on Mac,
109 then move this smaller gnome-lib-minimal dir from the top-level ext folder
110 to gs2build/ext, since wvware on mac needs gnome-lib-minimal -->
111 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
112 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
113 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
114 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
115 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
116 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
117 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/share"/>
118 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
119 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
120 <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
121 <move file="${basedir}/compiled/ext/gnome-lib-minimal" todir="compiled/gs2build/ext"/>
122 </if>
123
124 <!-- Delete Lucene 3.3 specific ext/solr folders, since we've switched over to Lucene 4.7.2 -->
125 <delete dir="${basedir}/compiled/ext/solr/lib3" />
126 <delete dir="${basedir}/compiled/ext/solr/conf3" />
127 <delete dir="${basedir}/compiled/ext/solr/etc3" />
128
129
130 <if><bool><and>
131 <equals arg1="${rk.os}" arg2="linux"/>
132 <equals arg1="${extension-x64}" arg2="-x64"/>
133 </and></bool>
134 <property name="bitness" value="64"/>
135 <else>
136 <property name="bitness" value="32"/>
137 </else>
138 </if>
139
140 <!-- insert an xml parser (matched to the version of Perl being used by the release kit).
141 For Linux 64 bit, use the 64 bit versions.
142 For other *nix cases, including Macs, we stick to the 32 bit
143 versions since there have been no problems yet, probably
144 because our Mac has 5.12 which is not included in
145 XML-Parser so that our mac then tries to find the xml
146 parser on the system.-->
147 <if><bool><not><equals arg1="${rk.os}" arg2="windows"/></not></bool>
148 <copy todir="compiled/gs2build/perllib/cpan">
149 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="${bitness}-bit/**/*"/>
150 </copy>
151 <move file="compiled/gs2build/perllib/cpan/${bitness}-bit" tofile="compiled/gs2build/perllib/cpan/XML-Parser"/>
152 </if>
153
154 <!-- insert ant -->
155 <property name="insert.ant.version" value="1.9.13"/> <!-- value="1.8.2" -->
156 <mkdir dir="compiled/packages"/>
157 <get src="http://www.greenstone.org/gs3files/apache-ant-${insert.ant.version}-bin.tar.gz" dest="compiled/packages/apache-ant-${insert.ant.version}-bin.tar.gz"/>
158 <untar src="compiled/packages/apache-ant-${insert.ant.version}-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
159 <move file="compiled/packages/apache-ant-${insert.ant.version}" tofile="compiled/packages/ant"/>
160 <delete file="compiled/packages/apache-ant-${insert.ant.version}-bin.tar.gz"/>
161
162 <!-- put the uninstaller in place -->
163 <antcall target="insert-and-compile-uninstaller"/>
164
165 <!-- (windows only) -->
166 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
167 <!-- insert perl -->
168 <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
169 </if>
170
171 <!-- minify tomcat -->
172 <delete dir="compiled/packages/tomcat/webapps/docs"/>
173 <delete dir="compiled/packages/tomcat/webapps/examples"/>
174
175 <!-- tidy up gli to make it smaller -->
176 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
177
178 <!-- strip out .svn dirs -->
179 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
180
181 <!-- get rid of bin/formatconverter on windows and get rid of bin/formatconverter.exe on linux/mac. Now we have specific OS dirs, so get rid of the irrelevant OS dirs instead -->
182 <if>
183 <bool><equals arg1="${rk.os}" arg2="windows"/></bool>
184 <delete dir="compiled/bin/darwin"/>
185 <delete dir="compiled/bin/linux"/>
186 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
187 <delete dir="compiled/bin/windows"/>
188 <delete dir="compiled/bin/linux"/>
189 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
190 <delete dir="compiled/bin/windows"/>
191 <delete dir="compiled/bin/darwin"/>
192 </if></else>
193 </if></else>
194 </if>
195
196 <!-- (linux only) -->
197 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
198 <!-- grab imagemagick binaries -->
199 <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
200
201 <exec executable="svn">
202 <arg value="export"/>
203 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-linux${extension-x64}.tar.gz"/>
204 <arg value="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
205 </exec>
206
207 <exec executable="tar" dir="compiled/ext">
208 <arg value="xvzf"/>
209 <arg value="imagemagick-linux${extension-x64}.tar.gz"/>
210 </exec>
211 <delete file="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
212 <move todir="compiled/gs2build/bin/linux/imagemagick">
213 <fileset dir="compiled/ext/imagemagick/linux"/>
214 </move>
215 <delete dir="compiled/ext/imagemagick"/>
216
217 <!--<delete dir="compiled/gs2build/bin/linux/imagemagick"/>
218 <exec executable="svn">
219 <arg value="export"/>
220 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
221 <arg value="compiled/gs2build/bin/linux/imagemagick"/>
222 </exec>-->
223
224 <!-- We don't want to bundle the old pre-compiled 32 bit wv folder anymore -->
225 <!-- grab wv binaries -->
226 <!--<delete dir="compiled/gs2build/bin/linux/wv"/>
227 <exec executable="svn">
228 <arg value="export"/>
229 <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
230 <arg value="compiled/gs2build/bin/linux/wv"/>
231 </exec>
232 -->
233 <!-- (mac only) -->
234 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
235 <!-- grab imagemagick binaries -->
236
237 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
238
239 <!--<exec executable="svn">
240 <arg value="export"/>
241 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.5.tar.gz"/>
242 <arg value="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
243 </exec>
244
245 <exec executable="tar" dir="compiled/ext">
246 <arg value="xvzf"/>
247 <arg value="imagemagick-darwin-10.5.tar.gz"/>
248 </exec>
249 <delete file="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
250 <move todir="compiled/gs2build/bin/darwin/imagemagick">
251 <fileset dir="compiled/ext/imagemagick/darwin"/>
252 </move>
253 <delete dir="compiled/ext/imagemagick"/>-->
254
255 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
256 <exec executable="svn">
257 <arg value="export"/>
258 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
259 <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
260 </exec>
261
262 <if><bool><not><equals arg1="${forward.install.flax}" arg2="true"/></not></bool>
263 <!-- grab ghostscript binaries -->
264 <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
265 <exec executable="svn">
266 <arg value="export"/>
267 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
268 <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
269 </exec>
270 </if>
271 </if></else></if>
272
273 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
274 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
275 <arg line="-S"/>
276 <arg line="gs2build/bin/script/import.pl -removeold -site localsite lucene-jdbm-demo"/>
277 <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
278 <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
279 <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
280 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
281 <env key="GSDLOS" value="windows"/>
282 <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
283 </exec>
284 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
285 <arg line="-S"/>
286 <arg line="gs2build/bin/script/buildcol.pl -removeold -site localsite lucene-jdbm-demo"/>
287 <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
288 <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
289 <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
290 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
291 <env key="GSDLOS" value="windows"/>
292 <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
293 </exec>
294 <delete dir="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
295 <move file="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building" tofile="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
296 <else>
297 <echo file="${basedir}/compiled/buildscript.sh">
298 #!/bin/bash
299 source gs3-setup.sh
300 /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/import.pl -site localsite lucene-jdbm-demo
301 /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/buildcol.pl -site localsite lucene-jdbm-demo
302 rm -rf ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
303 mv ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
304 </echo>
305 <chmod perm="775" file="${basedir}/compiled/buildscript.sh"/>
306 <exec dir="${basedir}/compiled" executable="/bin/bash">
307 <arg line="buildscript.sh"/>
308 </exec>
309 <delete file="${basedir}/compiled/buildscript.sh"/>
310 </else>
311 </if>
312
313 </target>
314
315</project>
Note: See TracBrowser for help on using the repository browser.