[16814] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <!--
|
---|
| 3 | ..........................................................
|
---|
| 4 | August 2008
|
---|
| 5 | Targets for Greenstone2 release kits
|
---|
| 6 | Oran Fry
|
---|
| 7 | ..........................................................
|
---|
| 8 | -->
|
---|
| 9 |
|
---|
| 10 | <project name="rk2-targets">
|
---|
| 11 |
|
---|
[17703] | 12 | <property name="version.major" value="2"/>
|
---|
[16814] | 13 |
|
---|
[17958] | 14 | <target name="export-gsdl-gli">
|
---|
| 15 | <delete dir="${dest}"/>
|
---|
| 16 | <svn>
|
---|
| 17 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="${dest}"/>
|
---|
| 18 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="${dest}/gli"/>
|
---|
| 19 | </svn>
|
---|
| 20 | </target>
|
---|
| 21 |
|
---|
[18065] | 22 | <target name="drop-in-docs">
|
---|
| 23 | <echo level="info">Dropping gsdl docs into distribution</echo>
|
---|
| 24 | <copy todir="${gsdl.basedir}" overwrite="true">
|
---|
| 25 | <fileset dir="${rk.home}/greenstone2/docs"/>
|
---|
| 26 | </copy>
|
---|
| 27 | </target>
|
---|
| 28 |
|
---|
[17898] | 29 | <target name="gsdl-set-version-numbers">
|
---|
[18052] | 30 |
|
---|
[18774] | 31 | <echo level="info">Setting version in common-src/src/lib/gsdlconf.h</echo>
|
---|
[17898] | 32 | <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
[17259] | 33 |
|
---|
[17898] | 34 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
| 35 | <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
[18052] | 36 |
|
---|
[19439] | 37 | <echo level="info">Setting version in server.properties</echo>
|
---|
| 38 | <rsr file="${gsdl.basedir}/lib/java/server.properties" pattern="^(Server2Control.Version[:=]).*" replacement="$1${version}" />
|
---|
| 39 |
|
---|
| 40 | <echo level="info">Sneakily changing some log4j stuff</echo>
|
---|
| 41 | <rsr file="${gsdl.basedir}/lib/java/log4j.properties.in" pattern="^(log4j.category.org.greenstone.server[:=].*)INFO(.*)" replacement="$1WARN$2" />
|
---|
| 42 |
|
---|
[18769] | 43 | <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
|
---|
| 44 |
|
---|
| 45 | </target>
|
---|
| 46 |
|
---|
| 47 | <target name="gsdl-set-dates-in-readmes">
|
---|
[18052] | 48 | <echo level="info">Changing date and version in the docs</echo>
|
---|
[18769] | 49 |
|
---|
[18052] | 50 | <!-- en -->
|
---|
[18774] | 51 | <if><bool><available file="${gsdl.basedir}/READMEen.txt"/></bool>
|
---|
| 52 | <rsr file="${gsdl.basedir}/READMEen.txt">
|
---|
| 53 | <job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
|
---|
| 54 | <job pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
| 55 | </rsr>
|
---|
| 56 | </if>
|
---|
[18052] | 57 |
|
---|
[18769] | 58 | <!-- ar -->
|
---|
[18774] | 59 | <if><bool><available file="${gsdl.basedir}/READMEar.txt"/></bool>
|
---|
| 60 | <rsr file="${gsdl.basedir}/READMEar.txt">
|
---|
| 61 | <job pattern="(اÙتارÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
|
---|
| 62 | <job pattern="(اÙÙسخ٠: \s*)(.*)" replacement="$1${version}"/>
|
---|
| 63 | </rsr>
|
---|
| 64 | </if>
|
---|
[18065] | 65 |
|
---|
[18769] | 66 | <!-- es -->
|
---|
[18774] | 67 | <if><bool><available file="${gsdl.basedir}/READMEes.txt"/></bool>
|
---|
| 68 | <rsr file="${gsdl.basedir}/READMEes.txt">
|
---|
| 69 | <job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
|
---|
| 70 | <job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}"/>
|
---|
| 71 | </rsr>
|
---|
| 72 | </if>
|
---|
[18769] | 73 |
|
---|
| 74 | <!-- fr -->
|
---|
[18774] | 75 | <if><bool><available file="${gsdl.basedir}/READMEfr.txt"/></bool>
|
---|
| 76 | <rsr file="${gsdl.basedir}/READMEfr.txt">
|
---|
| 77 | <job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
|
---|
| 78 | <job pattern="^(Version\s*)(.*)" replacement="$1${version}"/>
|
---|
| 79 | </rsr>
|
---|
| 80 | </if>
|
---|
[18769] | 81 |
|
---|
| 82 | <!-- ru -->
|
---|
[18774] | 83 | <if><bool><available file="${gsdl.basedir}/READMEru.txt"/></bool>
|
---|
| 84 | <rsr file="${gsdl.basedir}/READMEru.txt">
|
---|
| 85 | <job pattern="^(ÐаÑа\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
|
---|
| 86 | <job pattern="^(ÐеÑÑОÑ\s*)(.*)" replacement="$1${version}"/>
|
---|
| 87 | </rsr>
|
---|
| 88 | </if>
|
---|
[18769] | 89 |
|
---|
[17259] | 90 | </target>
|
---|
| 91 |
|
---|
[18769] | 92 |
|
---|
[17448] | 93 | <target name="insert-export-to-cd-package">
|
---|
[17953] | 94 | <mkdir dir="${gsdl.basedir}/bin/windows"/>
|
---|
| 95 | <get src="http://greenstone.org/release-snapshots/server.exe" dest="${gsdl.basedir}/bin/windows/server.exe"/>
|
---|
| 96 | <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
|
---|
| 97 | <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
|
---|
[17448] | 98 | </target>
|
---|
[17259] | 99 |
|
---|
[17996] | 100 | <target name="create-binary-zip-linux">
|
---|
| 101 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
[18929] | 102 |
|
---|
| 103 | <delete dir="${binzip.dir}"/>
|
---|
[17996] | 104 | <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
|
---|
| 105 |
|
---|
| 106 | <!-- delete sourcecode -->
|
---|
| 107 | <delete dir="${binzip.dir}/common-src"/>
|
---|
| 108 | <delete dir="${binzip.dir}/build-src"/>
|
---|
| 109 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
| 110 |
|
---|
| 111 | <!-- delete loose files -->
|
---|
| 112 | <delete>
|
---|
[18005] | 113 | <fileset
|
---|
| 114 | dir="${binzip.dir}"
|
---|
[18008] | 115 | includes="README*.txt,Uninstall.sh,uninst.jar,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in"
|
---|
[18005] | 116 | excludes="READMEen.txt"/>
|
---|
[17996] | 117 | </delete>
|
---|
| 118 |
|
---|
| 119 | </target>
|
---|
| 120 |
|
---|
| 121 | <target name="create-binary-zip-windows">
|
---|
[18003] | 122 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
| 123 | <copy todir="${binzip.dir}">
|
---|
[17996] | 124 | <fileset dir="distributions/web"/>
|
---|
| 125 | </copy>
|
---|
[18016] | 126 |
|
---|
| 127 | <!-- delete sourcecode -->
|
---|
| 128 | <delete dir="${binzip.dir}/common-src"/>
|
---|
| 129 | <delete dir="${binzip.dir}/build-src"/>
|
---|
| 130 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
| 131 |
|
---|
| 132 | <!-- delete loose files -->
|
---|
[17996] | 133 | <delete>
|
---|
[18016] | 134 | <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
|
---|
[17996] | 135 | </delete>
|
---|
| 136 | </target>
|
---|
| 137 |
|
---|
[18052] | 138 | <target name="create-needed-empty-files">
|
---|
| 139 | <mkdir dir="${gsdl.basedir}/tmp"/>
|
---|
| 140 | <chmod dir="${gsdl.basedir}/tmp" perm="a+rwx"/>
|
---|
| 141 | <echo file="${gsdl.basedir}/etc/usage.txt"></echo>
|
---|
| 142 | </target>
|
---|
| 143 |
|
---|
[18929] | 144 | <target name="dist-clean-sourcecode">
|
---|
| 145 | <delete>
|
---|
| 146 | <fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
|
---|
| 147 | </delete>
|
---|
| 148 | <delete dir="distributions/web/common-src"/>
|
---|
| 149 | <delete dir="distributions/web/build-src"/>
|
---|
| 150 | <delete dir="distributions/web/runtime-src"/>
|
---|
[19395] | 151 | <!--
|
---|
| 152 | <svn>
|
---|
[18929] | 153 | <export srcurl="${svn.root}/gsdl/${branch.path}/common-src" destPath="distributions/web/common-src"/>
|
---|
| 154 | <export srcurl="${svn.root}/gsdl/${branch.path}/build-src" destPath="distributions/web/build-src"/>
|
---|
| 155 | <export srcurl="${svn.root}/gsdl/${branch.path}/runtime-src" destPath="distributions/web/runtime-src"/>
|
---|
| 156 | </svn>
|
---|
[19395] | 157 | -->
|
---|
[18929] | 158 | </target>
|
---|
| 159 |
|
---|
| 160 | <target name="dist-unzip-packages">
|
---|
| 161 | <untar src="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/distributions/web/common-src/packages/sqlite" compression="gzip"/>
|
---|
| 162 | <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
| 163 | </target>
|
---|
| 164 |
|
---|
| 165 | <target name="make-common-src">
|
---|
| 166 | <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
|
---|
| 167 | <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
|
---|
| 168 | </target>
|
---|
| 169 |
|
---|
| 170 | <target name="checkout-gsdl-gli">
|
---|
| 171 | <svn>
|
---|
| 172 | <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
|
---|
| 173 | <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
|
---|
| 174 | </svn>
|
---|
| 175 | </target>
|
---|
| 176 |
|
---|
| 177 | <target name="compile-gli">
|
---|
| 178 |
|
---|
| 179 | <!-- default to sh -->
|
---|
| 180 | <property name="script.format" value="sh"/>
|
---|
| 181 |
|
---|
| 182 | <echo>Compiling gli...</echo>
|
---|
| 183 | <exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
|
---|
| 184 |
|
---|
| 185 | <echo>Creating jar...</echo>
|
---|
| 186 | <exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
|
---|
| 187 |
|
---|
| 188 | <echo>Cleaning up intermediate files...</echo>
|
---|
| 189 | <delete dir="${glibasedir}/jar"/>
|
---|
| 190 | <delete dir="${glibasedir}/classes/org"/>
|
---|
| 191 |
|
---|
| 192 | <if><bool><isset property="gsdlbasedir"/></bool>
|
---|
| 193 | <echo>Putting gli server jar in a better place</echo>
|
---|
| 194 | <exec executable="mv" failonerror="true">
|
---|
| 195 | <arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
|
---|
| 196 | </exec>
|
---|
| 197 | </if>
|
---|
| 198 |
|
---|
| 199 | </target>
|
---|
| 200 |
|
---|
| 201 |
|
---|
[16833] | 202 | </project>
|
---|
[18005] | 203 |
|
---|