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