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

Last change on this file since 28282 was 28282, checked in by ak19, 11 years ago

Bugfix. In GS3 binaries, to get wvware to convert word docs on Mac Leopards (and eventually Lions), need to have the reduced gnome-lib-minimal's lib folder living in gs2build/ext not in GS3/ext, so added the move operation. Mac (Mountain) Lion doesn't yet work, but the first hurdle is to compile gnome-lib successfully on Mountain Lion and then create a gnome-lib-minimal archive for it and check that wvware then works with Lion GS3 binaries.

File size: 11.7 KB
RevLine 
[20335]1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk3-compile">
3
4 <target name="compile">
[21630]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"/>
[21652]11 <arg value="-r"/><arg value="${branch.revision}"/>
[21630]12 </exec>
13
[23811]14 <if><bool><equals arg1="${with.jni}" arg2="false"/></bool>
15 <rsr file="${basedir}/compiled/build.properties.in" 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.in" pattern="with.gli.and.gems=true" replacement="#with.gli.and.gems=true"/>
20 </if>
21
[21748]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
[22851]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>
[27186]29 <property name="forward.use.gnomelib.ext" value="true"/>
[22851]30 </if>
31
32 <antcall target="persist-forwarded-properties">
33 <param name="greenstone3basedir" value="compiled"/>
34 </antcall>
35
[21630]36 <!-- run greenstone3's ant prepare -->
[20335]37 <ant dir="compiled" inheritAll="false">
38 <target name="prepare"/>
39 <propertyset refid="forward.properties"/>
[21748]40 <property name="properties.accepted" value="true"/>
[20335]41 </ant>
[21630]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
[22836]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-->
[22939]51 <if><bool><or>
[23618]52 <equals arg1="${post.2.83.version}" arg2="true"/>
[22939]53 </or></bool>
[23612]54 <echo>EXPORTING GNOME LIB EXTENSION</echo>
[22836]55 <exec executable="svn">
[23612]56 <arg value="export"/>
[23644]57 <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${os.shell}${arch}${extension-x64}.tar.gz"/>
[23612]58 <arg value="${basedir}/compiled/ext/gnome-lib-${os.shell}.tar.gz"/>
[22836]59 </exec>
[23612]60
61 <exec executable="tar" dir="${basedir}/compiled/ext">
62 <arg value="xvzf"/>
63 <arg value="gnome-lib-${os.shell}.tar.gz"/>
64 </exec>
65
66 <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
[22836]67 <arg value="-c"/>
[24389]68 <arg value="source setup.bash_old &amp;&amp; source devel.bash"/>
[22836]69 </exec>
[22939]70 <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
[22941]71 </if>
[22836]72 </if>
73
[21630]74 <!-- run greenstone3's ant install and ant dist-tidy -->
[20335]75 <ant dir="compiled" inheritAll="false">
76 <target name="install"/>
77 <target name="dist-tidy"/>
78 <propertyset refid="forward.properties"/>
[21748]79 <property name="properties.accepted" value="true"/>
[20335]80 </ant>
81
[23967]82 <!-- Delete all collections apart from the Lucene demo collection -->
83 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gberg"/>
84 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgdemo"/>
85 <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgppdemo"/>
86 <delete dir="${basedir}/compiled/web/sites/localsite/collect/infomine"/>
87
[22851]88 <!-- Delete the entire gnome support library on Linux -->
89 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
[23618]90 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
91 <delete file="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
[22851]92 </if>
93
[28282]94 <!-- Delete all but the lib folder of the gnome support library on Mac,
95 then move this smaller gnome-lib-minimal dir from the top-level ext folder
96 to gs2build/ext, since wvware on mac needs gnome-lib-minimal -->
[22851]97 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
[23618]98 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
99 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
100 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
101 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
102 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
103 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/share"/>
104 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
105 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
106 <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
[28282]107 <move file="${basedir}/compiled/ext/gnome-lib-minimal" todir="compiled/gs2build/ext"/>
[22851]108 </if>
109
[27769]110 <!-- insert an xml parser (matched to the version of Perl being used by the release kit) -->
[21630]111 <copy todir="compiled/gs2build/perllib/cpan">
[22425]112 <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
[21630]113 </copy>
114
[21842]115 <!-- insert ant -->
[27797]116 <property name="insert.ant.version" value="1.8.2"/>
[21842]117 <mkdir dir="compiled/packages"/>
[27797]118 <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"/>
119 <untar src="compiled/packages/apache-ant-${insert.ant.version}-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
120 <move file="compiled/packages/apache-ant-${insert.ant.version}" tofile="compiled/packages/ant"/>
121 <delete file="compiled/packages/apache-ant-${insert.ant.version}-bin.tar.gz"/>
[21630]122
123 <!-- put the uninstaller in place -->
124 <antcall target="insert-and-compile-uninstaller"/>
125
126 <!-- (windows only) -->
[20335]127 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
[21630]128 <!-- insert perl -->
129 <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
[20335]130 </if>
[21630]131
132 <!-- minify tomcat -->
133 <delete dir="compiled/packages/tomcat/webapps/docs"/>
134 <delete dir="compiled/packages/tomcat/webapps/examples"/>
135
136 <!-- tidy up gli to make it smaller -->
137 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
138
139 <!-- strip out .svn dirs -->
140 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
141
[24089]142 <!-- (linux only) -->
143 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
144 <!-- grab imagemagick binaries -->
145 <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
[27731]146
147 <exec executable="svn">
148 <arg value="export"/>
149 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-linux${extension-x64}.tar.gz"/>
150 <arg value="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
151 </exec>
152
153 <exec executable="tar" dir="compiled/ext">
154 <arg value="xvzf"/>
155 <arg value="imagemagick-linux${extension-x64}.tar.gz"/>
156 </exec>
157 <delete file="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
158 <move todir="compiled/gs2build/bin/linux/imagemagick">
159 <fileset dir="compiled/ext/imagemagick/linux"/>
160 </move>
161 <delete dir="compiled/ext/imagemagick"/>
162
163 <!--<delete dir="compiled/gs2build/bin/linux/imagemagick"/>
[24089]164 <exec executable="svn">
165 <arg value="export"/>
166 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
167 <arg value="compiled/gs2build/bin/linux/imagemagick"/>
[27731]168 </exec>-->
[24089]169
170 <!-- grab wv binaries -->
171 <delete dir="compiled/gs2build/bin/linux/wv"/>
172 <exec executable="svn">
173 <arg value="export"/>
174 <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
175 <arg value="compiled/gs2build/bin/linux/wv"/>
176 </exec>
177 <!-- (mac only) -->
178 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
179 <!-- grab imagemagick binaries -->
[27731]180
181 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
182
[27888]183 <!--<exec executable="svn">
[27731]184 <arg value="export"/>
185 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.5.tar.gz"/>
186 <arg value="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
187 </exec>
188
189 <exec executable="tar" dir="compiled/ext">
190 <arg value="xvzf"/>
191 <arg value="imagemagick-darwin-10.5.tar.gz"/>
192 </exec>
193 <delete file="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
194 <move todir="compiled/gs2build/bin/darwin/imagemagick">
195 <fileset dir="compiled/ext/imagemagick/darwin"/>
196 </move>
[27888]197 <delete dir="compiled/ext/imagemagick"/>-->
[27731]198
[27888]199 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
[24089]200 <exec executable="svn">
201 <arg value="export"/>
202 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
203 <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
[27888]204 </exec>
[24089]205
206 <if><bool><not><equals arg1="${forward.install.flax}" arg2="true"/></not></bool>
207 <!-- grab ghostscript binaries -->
208 <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
209 <exec executable="svn">
210 <arg value="export"/>
211 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
212 <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
213 </exec>
214 </if>
215 </if></else></if>
216
[24053]217 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
[24084]218 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
[24053]219 <arg line="-S"/>
[24094]220 <arg line="gs2build/bin/script/import.pl -removeold -site localsite lucene-jdbm-demo"/>
[24053]221 <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
[24085]222 <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
223 <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
[24053]224 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
[24094]225 <env key="GSDLOS" value="windows"/>
[24097]226 <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
[24053]227 </exec>
[24084]228 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
[24053]229 <arg line="-S"/>
[24094]230 <arg line="gs2build/bin/script/buildcol.pl -removeold -site localsite lucene-jdbm-demo"/>
[24053]231 <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
[24085]232 <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
233 <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
[24053]234 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
[24094]235 <env key="GSDLOS" value="windows"/>
[24097]236 <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
[24053]237 </exec>
[24088]238 <delete dir="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
[24092]239 <move file="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building" tofile="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
[24053]240 <else>
241 <echo file="${basedir}/compiled/buildscript.sh">
242 #!/bin/bash
243 source gs3-setup.sh
244 /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/import.pl -site localsite lucene-jdbm-demo
245 /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/buildcol.pl -site localsite lucene-jdbm-demo
246 rm -rf ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
247 mv ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
248 </echo>
249 <chmod perm="775" file="${basedir}/compiled/buildscript.sh"/>
250 <exec dir="${basedir}/compiled" executable="/bin/bash">
251 <arg line="buildscript.sh"/>
252 </exec>
253 <delete file="${basedir}/compiled/buildscript.sh"/>
254 </else>
255 </if>
[24089]256
[20335]257 </target>
258
259</project>
Note: See TracBrowser for help on using the repository browser.