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