[17950] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <!--
|
---|
[20084] | 3 | ..........................................................
|
---|
| 4 | November 2008
|
---|
[17950] | 5 | Source Release Kit for Greenstone2 (sork2)
|
---|
| 6 | Oran Fry
|
---|
| 7 | ..........................................................
|
---|
| 8 | -->
|
---|
| 9 |
|
---|
| 10 | <project name="sork2-build" default="sork2">
|
---|
| 11 |
|
---|
| 12 | <!-- CONSTANTS -->
|
---|
| 13 |
|
---|
[19039] | 14 | <!-- for the benefit of the shared scripts, set release-kit home -->
|
---|
[17950] | 15 | <property name="rk.name" value="sork2"/>
|
---|
| 16 | <property name="rk.home" value="${sork2.home}" />
|
---|
| 17 | <property name="rk.os" value="multi" />
|
---|
| 18 | <property name="os.suffix" value="AnyPlatform"/>
|
---|
| 19 |
|
---|
| 20 | <!-- IMPORT OTHER ANT SCRIPTS -->
|
---|
[21648] | 21 | <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
|
---|
| 22 | <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
|
---|
| 23 | <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/>
|
---|
[17950] | 24 |
|
---|
| 25 | <!-- THE MAIN TARGET -->
|
---|
| 26 | <target name="sork2" depends="init">
|
---|
[19459] | 27 | <antcall target="export-gsdl-gli"><param name="dest" value="distributions/Greenstone-${version}-source-distribution"/></antcall>
|
---|
| 28 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution"/></antcall>
|
---|
| 29 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/gli"/></antcall>
|
---|
[17972] | 30 | <antcall target="insert-winbin"/>
|
---|
[19901] | 31 | <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/bin/windows"/></antcall>
|
---|
[17950] | 32 | <antcall target="tweak-files" />
|
---|
| 33 | <antcall target="create-archives"/>
|
---|
[19386] | 34 | <antcall target="create-sourcecode"/>
|
---|
[17950] | 35 | </target>
|
---|
| 36 |
|
---|
[19039] | 37 | <target name="properties">
|
---|
| 38 | <echo>Required Properties:</echo>
|
---|
| 39 | <echo>version the version string for the release</echo>
|
---|
| 40 | <echo/>
|
---|
| 41 |
|
---|
| 42 | <echo>Optional Properties:</echo>
|
---|
| 43 | <echo>branch.path the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo>
|
---|
| 44 | <echo>branch.revision the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo>
|
---|
| 45 | <echo/>
|
---|
| 46 | </target>
|
---|
| 47 |
|
---|
| 48 |
|
---|
[17950] | 49 | <target name="tweak-files">
|
---|
[19459] | 50 | <delete file="distributions/Greenstone-${version}-source-distribution/bin/linux/mgquery_old" />
|
---|
[17950] | 51 | </target>
|
---|
| 52 |
|
---|
[17968] | 53 | <target name="insert-winbin">
|
---|
[19459] | 54 | <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows"/>
|
---|
[21649] | 55 | <exec executable="svn">
|
---|
| 56 | <arg value="export"/>
|
---|
| 57 | <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
|
---|
| 58 | <arg value="distributions/Greenstone-${version}-source-distribution/bin/windows"/>
|
---|
| 59 | </exec>
|
---|
[20084] | 60 | <get src="${server.exe.location}" dest="distributions/Greenstone-${version}-source-distribution/bin/windows/server.exe"/>
|
---|
[18011] | 61 |
|
---|
[19459] | 62 | <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/imagemagick"/>
|
---|
| 63 | <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/ghostscript"/>
|
---|
[17968] | 64 | </target>
|
---|
[17950] | 65 |
|
---|
[17969] | 66 | <target name="create-archives">
|
---|
| 67 | <mkdir dir="products"/>
|
---|
[19566] | 68 | <delete file="products/Greenstone-${version}-source-distribution.zip"/>
|
---|
| 69 | <zip destfile="products/Greenstone-${version}-source-distribution.zip" basedir="distributions" includes="Greenstone-${version}-source-distribution/**/*"/>
|
---|
[17973] | 70 | <exec dir="distributions" executable="tar">
|
---|
[19459] | 71 | <arg line="-czf ../products/Greenstone-${version}-source-distribution.tar.gz Greenstone-${version}-source-distribution"/>
|
---|
[17973] | 72 | </exec>
|
---|
[17969] | 73 | </target>
|
---|
[17950] | 74 |
|
---|
[19386] | 75 | <target name="create-sourcecode">
|
---|
| 76 | <!-- create a directory for the sourcecode -->
|
---|
[19600] | 77 | <mkdir dir="distributions/source-component"/>
|
---|
[19386] | 78 |
|
---|
| 79 | <!-- copy the files in -->
|
---|
[19459] | 80 | <exec dir="distributions/Greenstone-${version}-source-distribution" executable="cp">
|
---|
[19386] | 81 | <arg value="-r"/>
|
---|
| 82 |
|
---|
| 83 | <!-- the bulk sourcecode -->
|
---|
| 84 | <arg value="build-src"/>
|
---|
| 85 | <arg value="common-src"/>
|
---|
| 86 | <arg value="runtime-src"/>
|
---|
| 87 |
|
---|
| 88 | <!-- unix build files -->
|
---|
| 89 | <arg value="acconfig.h"/>
|
---|
| 90 | <arg value="aclocal.m4"/>
|
---|
| 91 | <arg value="config.sub"/>
|
---|
[19600] | 92 | <arg value="config.guess"/>
|
---|
[19386] | 93 | <arg value="configtest.pl"/>
|
---|
| 94 | <arg value="configure"/>
|
---|
| 95 | <arg value="configure.in"/>
|
---|
| 96 | <arg value="install-sh"/>
|
---|
| 97 | <arg value="Makefile.in"/>
|
---|
| 98 | <arg value="micotest.cpp"/>
|
---|
| 99 | <arg value="config.h.in"/>
|
---|
| 100 | <arg value="Install.txt"/>
|
---|
| 101 |
|
---|
| 102 | <!-- windows build files -->
|
---|
[20084] | 103 | <arg value="win32.mak"/>
|
---|
| 104 | <arg value="win32cfg.h"/>
|
---|
[19386] | 105 | <arg value="makegs2.bat"/>
|
---|
| 106 |
|
---|
| 107 | <!-- destination -->
|
---|
[20084] | 108 | <arg value="../source-component"/>
|
---|
[19386] | 109 |
|
---|
| 110 | </exec>
|
---|
| 111 |
|
---|
| 112 | <!-- unzip some windows packages -->
|
---|
[19600] | 113 | <unzip src="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/source-component/common-src/indexers/packages/windows/iconv"/>
|
---|
| 114 | <delete file="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip"/>
|
---|
[19386] | 115 |
|
---|
[19600] | 116 | <unzip src="distributions/source-component/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/common-src/packages/windows/crypt"/>
|
---|
| 117 | <delete file="distributions/source-component/common-src/packages/windows/crypt/crypt.zip"/>
|
---|
[19386] | 118 |
|
---|
[19600] | 119 | <unzip src="distributions/source-component/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/common-src/packages/windows/expat"/>
|
---|
| 120 | <delete file="distributions/source-component/common-src/packages/windows/expat/expat.zip"/>
|
---|
[19386] | 121 |
|
---|
[19600] | 122 | <unzip src="distributions/source-component/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/common-src/packages/windows/stlport"/>
|
---|
| 123 | <delete file="distributions/source-component/common-src/packages/windows/stlport/stlport.zip"/>
|
---|
[19386] | 124 |
|
---|
[19600] | 125 | <exec executable="tar" dir="distributions/source-component/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-amalgamation-3.5.9.tar.gz"/></exec>
|
---|
| 126 | <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
[19386] | 127 |
|
---|
[19600] | 128 | <exec executable="tar" dir="distributions/source-component/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
|
---|
| 129 | <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
| 130 |
|
---|
[19566] | 131 | <!-- archive it -->
|
---|
| 132 | <delete file="products/Greenstone-${version}-source-component.zip"/>
|
---|
[19600] | 133 | <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
|
---|
| 134 | <exec dir="distributions/source-component" executable="bash">
|
---|
| 135 | <arg value="-c"/>
|
---|
| 136 | <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
|
---|
[19386] | 137 | </exec>
|
---|
| 138 | </target>
|
---|
| 139 |
|
---|
[21394] | 140 | <target name="export-gsdl-gli">
|
---|
| 141 | <delete dir="${dest}"/>
|
---|
| 142 | <exec executable="svn">
|
---|
| 143 | <arg value="export"/>
|
---|
| 144 | <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
|
---|
| 145 | <arg value="${dest}"/>
|
---|
| 146 | </exec>
|
---|
| 147 | <exec executable="svn">
|
---|
| 148 | <arg value="export"/>
|
---|
| 149 | <arg value="${svn.root}/main/${branch.path}/gli"/>
|
---|
| 150 | <arg value="${dest}/gli"/>
|
---|
| 151 | </exec>
|
---|
| 152 | </target>
|
---|
[19386] | 153 |
|
---|
[21394] | 154 |
|
---|
[17950] | 155 | </project>
|
---|