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