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