[20721] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <!--
|
---|
| 3 | ..........................................................
|
---|
| 4 | September 2009
|
---|
| 5 | Release Kit for Greenstone2 (rk2)
|
---|
| 6 | Oran Fry
|
---|
| 7 | ..........................................................
|
---|
| 8 | -->
|
---|
| 9 |
|
---|
| 10 | <project name="rk2-build" default="rk2">
|
---|
| 11 |
|
---|
| 12 | <!-- IMPORT OTHER ANT SCRIPTS -->
|
---|
[21394] | 13 | <import file="${rk.home}/shared/core/ant-scripts/init.xml"/>
|
---|
| 14 | <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
|
---|
| 15 | <import file="${rk.home}/shared/greenstone2/ant-scripts/rk2-targets.xml"/>
|
---|
[20721] | 16 |
|
---|
| 17 | <import file="compile.xml"/>
|
---|
| 18 | <import file="create-distribution.xml"/>
|
---|
| 19 | <import file="create-components.xml"/>
|
---|
| 20 | <import file="create-installer.xml"/>
|
---|
| 21 | <import file="wrap.xml"/>
|
---|
| 22 | <import file="create-cdrom-components.xml"/>
|
---|
| 23 |
|
---|
[21311] | 24 | <import file="components.xml"/>
|
---|
| 25 |
|
---|
[20721] | 26 | <!-- THE MAIN TARGET -->
|
---|
[21394] | 27 | <target name="rk2" depends="init,gs2-init,compile,create-distribution,create-components,create-installer,wrap,create-cdrom-components"/>
|
---|
[20721] | 28 |
|
---|
| 29 | <target name="properties">
|
---|
| 30 | <echo>Required Properties:</echo>
|
---|
| 31 | <echo>version the version string for the release</echo>
|
---|
| 32 | <echo/>
|
---|
| 33 | <echo>Optional Properties:</echo>
|
---|
[21311] | 34 | <echo>branch.path the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo>
|
---|
| 35 | <echo>branch.revision the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo>
|
---|
[20721] | 36 | <echo/>
|
---|
| 37 | </target>
|
---|
| 38 |
|
---|
[21394] | 39 | <!-- TODO: Move the targets below to the xml file that calls it -->
|
---|
| 40 | <target name="checkout-gsdl-gli">
|
---|
| 41 | <exec executable="svn">
|
---|
| 42 | <arg value="checkout"/>
|
---|
| 43 | <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
|
---|
| 44 | <arg value="${basedir}/compiled"/>
|
---|
| 45 | </exec>
|
---|
| 46 | <exec executable="svn">
|
---|
| 47 | <arg value="checkout"/>
|
---|
| 48 | <arg value="${svn.root}/main/${branch.path}/gli"/>
|
---|
| 49 | <arg value="${basedir}/compiled/gli"/>
|
---|
| 50 | </exec>
|
---|
| 51 | </target>
|
---|
| 52 |
|
---|
| 53 | <target name="insert-export-to-cd-package">
|
---|
| 54 | <mkdir dir="${gsdl.basedir}/bin/windows"/>
|
---|
| 55 | <get src="${server.exe.location}" dest="${gsdl.basedir}/bin/windows/server.exe"/>
|
---|
| 56 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
|
---|
| 57 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
|
---|
| 58 | </target>
|
---|
| 59 |
|
---|
| 60 | <target name="create-binary-zip-unix">
|
---|
| 61 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
| 62 |
|
---|
| 63 | <delete dir="${binzip.dir}"/>
|
---|
| 64 | <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
|
---|
| 65 |
|
---|
| 66 | <!-- delete sourcecode -->
|
---|
| 67 | <delete dir="${binzip.dir}/common-src"/>
|
---|
| 68 | <delete dir="${binzip.dir}/build-src"/>
|
---|
| 69 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
| 70 |
|
---|
| 71 | <!-- delete loose files -->
|
---|
| 72 | <delete>
|
---|
| 73 | <fileset
|
---|
| 74 | dir="${binzip.dir}"
|
---|
| 75 | 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"
|
---|
| 76 | excludes="READMEen.txt"/>
|
---|
| 77 | </delete>
|
---|
| 78 |
|
---|
| 79 | </target>
|
---|
| 80 |
|
---|
| 81 | <target name="create-binary-zip-windows">
|
---|
| 82 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
| 83 | <copy todir="${binzip.dir}">
|
---|
| 84 | <fileset dir="distributions/web"/>
|
---|
| 85 | </copy>
|
---|
| 86 |
|
---|
| 87 | <!-- delete sourcecode -->
|
---|
| 88 | <delete dir="${binzip.dir}/common-src"/>
|
---|
| 89 | <delete dir="${binzip.dir}/build-src"/>
|
---|
| 90 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
| 91 |
|
---|
| 92 | <!-- delete loose files -->
|
---|
| 93 | <delete>
|
---|
| 94 | <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
|
---|
| 95 | </delete>
|
---|
| 96 | </target>
|
---|
| 97 |
|
---|
| 98 | <target name="dist-clean-sourcecode">
|
---|
| 99 |
|
---|
| 100 | <!-- delete the sourcecode -->
|
---|
| 101 | <delete>
|
---|
| 102 | <fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
|
---|
| 103 | </delete>
|
---|
| 104 | <delete dir="distributions/web/common-src"/>
|
---|
| 105 | <delete dir="distributions/web/build-src"/>
|
---|
| 106 | <delete dir="distributions/web/runtime-src"/>
|
---|
| 107 | <delete>
|
---|
| 108 | <fileset dir="distributions/web" 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"/>
|
---|
| 109 | </delete>
|
---|
| 110 |
|
---|
| 111 | </target>
|
---|
| 112 |
|
---|
| 113 | <target name="dist-unzip-packages">
|
---|
| 114 | <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"/>
|
---|
| 115 | <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
| 116 | </target>
|
---|
| 117 |
|
---|
| 118 | <target name="make-common-src">
|
---|
| 119 | <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
|
---|
[21593] | 120 | <!--<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>-->
|
---|
[21394] | 121 | </target>
|
---|
| 122 |
|
---|
| 123 | <target name="compile-gli">
|
---|
| 124 |
|
---|
| 125 | <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
|
---|
| 126 | <property name="script.format" value="sh"/>
|
---|
| 127 | <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
| 128 | <property name="script.format" value="bat"/>
|
---|
| 129 | </if></else></if>
|
---|
| 130 |
|
---|
| 131 | <echo>Compiling gli...</echo>
|
---|
| 132 | <exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
|
---|
| 133 |
|
---|
| 134 | <echo>Creating jar...</echo>
|
---|
| 135 | <exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
|
---|
| 136 |
|
---|
| 137 | <echo>Cleaning up intermediate files...</echo>
|
---|
| 138 | <delete dir="${glibasedir}/jar"/>
|
---|
| 139 | <delete dir="${glibasedir}/classes/org"/>
|
---|
| 140 |
|
---|
| 141 | <if><bool><isset property="gsdlbasedir"/></bool>
|
---|
| 142 | <echo>Putting gli server jar in a better place</echo>
|
---|
| 143 | <exec executable="mv" failonerror="true">
|
---|
| 144 | <arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
|
---|
| 145 | </exec>
|
---|
| 146 | </if>
|
---|
| 147 |
|
---|
| 148 | </target>
|
---|
| 149 |
|
---|
| 150 | <target name="copy-greenstone2-installer-files">
|
---|
| 151 | <!-- the installer descriptors -->
|
---|
| 152 | <copy todir="installer" file="${rk.home}/kits/rk2/installer/antinstall-config.xml" overwrite="true"/>
|
---|
[21510] | 153 | <copy todir="installer" file="${rk.home}/kits/rk2/installer/build.xml" overwrite="true"/>
|
---|
[21394] | 154 | </target>
|
---|
| 155 |
|
---|
[20721] | 156 | </project>
|
---|