[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 | <!-- IMPORT OTHER ANT SCRIPTS -->
|
---|
[21648] | 13 | <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
|
---|
| 14 | <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
|
---|
[17950] | 15 |
|
---|
| 16 | <!-- THE MAIN TARGET -->
|
---|
| 17 | <target name="sork2" depends="init">
|
---|
| 18 |
|
---|
[21650] | 19 | <!-- store the name of the distribution -->
|
---|
[21744] | 20 | <property name="dist.name" value="Greenstone-${version}-source-distribution"/>
|
---|
[19039] | 21 |
|
---|
[21650] | 22 | <!-- create distributions dir -->
|
---|
| 23 | <mkdir dir="distributions"/>
|
---|
[19039] | 24 |
|
---|
[21650] | 25 | <!-- export greenstone2 and gli -->
|
---|
| 26 | <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone2"/><arg value="distributions/${dist.name}"/></exec>
|
---|
| 27 | <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/gli"/><arg value="distributions/${dist.name}/gli"/></exec>
|
---|
[19039] | 28 |
|
---|
[21650] | 29 | <!-- set version numbers -->
|
---|
| 30 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/${dist.name}"/></antcall>
|
---|
| 31 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall>
|
---|
[17950] | 32 |
|
---|
[21650] | 33 | <!-- insert windows binaries -->
|
---|
| 34 | <delete dir="distributions/${dist.name}/bin/windows"/>
|
---|
[21649] | 35 | <exec executable="svn">
|
---|
| 36 | <arg value="export"/>
|
---|
| 37 | <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
|
---|
[21650] | 38 | <arg value="distributions/${dist.name}/bin/windows"/>
|
---|
[21649] | 39 | </exec>
|
---|
[21650] | 40 | <get src="${server.exe.location}" dest="distributions/${dist.name}/bin/windows/server.exe"/>
|
---|
| 41 | <delete dir="distributions/${dist.name}/bin/windows/imagemagick"/>
|
---|
| 42 | <delete dir="distributions/${dist.name}/bin/windows/ghostscript"/>
|
---|
[17950] | 43 |
|
---|
[21650] | 44 | <!-- insert windows perl -->
|
---|
| 45 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/bin/windows"/>
|
---|
| 46 |
|
---|
| 47 | <!-- clean up -->
|
---|
| 48 | <delete file="distributions/${dist.name}/bin/linux/mgquery_old" />
|
---|
| 49 |
|
---|
| 50 | <!-- create the archives (source code distribution) -->
|
---|
[17969] | 51 | <mkdir dir="products"/>
|
---|
[21650] | 52 | <delete file="products/${dist.name}.zip"/>
|
---|
| 53 | <zip destfile="products/${dist.name}.zip" basedir="distributions" includes="${dist.name}/**/*"/>
|
---|
[17973] | 54 | <exec dir="distributions" executable="tar">
|
---|
[21650] | 55 | <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/>
|
---|
[17973] | 56 | </exec>
|
---|
[17950] | 57 |
|
---|
[21650] | 58 | <!-- CREATE THE SOURCE CODE COMPONENT (SOURCE CODE TOP-UP TO THE BINARY RELEASE) -->
|
---|
| 59 |
|
---|
[19386] | 60 | <!-- create a directory for the sourcecode -->
|
---|
[19600] | 61 | <mkdir dir="distributions/source-component"/>
|
---|
[28510] | 62 | <mkdir dir="distributions/source-component/gli"/>
|
---|
[28535] | 63 | <mkdir dir="distributions/source-component/gli/classes"/>
|
---|
[19386] | 64 |
|
---|
[23254] | 65 | <!-- copy the files in -->
|
---|
[21650] | 66 | <exec dir="distributions/${dist.name}" executable="cp">
|
---|
[19386] | 67 | <arg value="-r"/>
|
---|
| 68 |
|
---|
| 69 | <!-- the bulk sourcecode -->
|
---|
| 70 | <arg value="build-src"/>
|
---|
| 71 | <arg value="common-src"/>
|
---|
| 72 | <arg value="runtime-src"/>
|
---|
| 73 |
|
---|
| 74 | <!-- unix build files -->
|
---|
| 75 | <arg value="acconfig.h"/>
|
---|
| 76 | <arg value="aclocal.m4"/>
|
---|
| 77 | <arg value="config.sub"/>
|
---|
[19600] | 78 | <arg value="config.guess"/>
|
---|
[19386] | 79 | <arg value="configtest.pl"/>
|
---|
| 80 | <arg value="configure"/>
|
---|
| 81 | <arg value="configure.in"/>
|
---|
| 82 | <arg value="install-sh"/>
|
---|
| 83 | <arg value="Makefile.in"/>
|
---|
| 84 | <arg value="micotest.cpp"/>
|
---|
| 85 | <arg value="config.h.in"/>
|
---|
| 86 | <arg value="Install.txt"/>
|
---|
[28510] | 87 | <arg value="makegs2.sh"/>
|
---|
[19386] | 88 |
|
---|
| 89 | <!-- windows build files -->
|
---|
[20084] | 90 | <arg value="win32.mak"/>
|
---|
| 91 | <arg value="win32cfg.h"/>
|
---|
[19386] | 92 | <arg value="makegs2.bat"/>
|
---|
[28510] | 93 | <arg value="makegs2x64.bat"/>
|
---|
[19386] | 94 |
|
---|
| 95 | <!-- destination -->
|
---|
[20084] | 96 | <arg value="../source-component"/>
|
---|
[19386] | 97 | </exec>
|
---|
| 98 |
|
---|
[28534] | 99 | <!-- also copy in the gli src folder into the src component and classes/images and classes/META-INF for generating jars -->
|
---|
[28530] | 100 | <exec dir="distributions/${dist.name}" executable="cp">
|
---|
[28510] | 101 | <arg value="-r"/>
|
---|
| 102 | <arg value="gli/src"/>
|
---|
[28535] | 103 | <!-- destination -->
|
---|
[28510] | 104 | <arg value="../source-component/gli"/>
|
---|
| 105 | </exec>
|
---|
[28535] | 106 | <exec dir="distributions/${dist.name}" executable="cp">
|
---|
| 107 | <arg value="-r"/>
|
---|
| 108 | <arg value="gli/classes/images"/>
|
---|
| 109 | <arg value="gli/classes/META-INF"/>
|
---|
| 110 | <!-- destination -->
|
---|
| 111 | <arg value="../source-component/gli/classes"/>
|
---|
[28534] | 112 | </exec>
|
---|
[28510] | 113 |
|
---|
[23254] | 114 | <patternset id="source.patternset">
|
---|
| 115 | <include name="build-src"/>
|
---|
| 116 | <include name="build-src/**/*"/>
|
---|
| 117 | <include name="common-src"/>
|
---|
| 118 | <include name="common-src/**/*"/>
|
---|
| 119 | <include name="runtime-src"/>
|
---|
| 120 | <include name="runtime-src/**/*"/>
|
---|
[28510] | 121 | <include name="gli/src"/>
|
---|
| 122 | <include name="gli/src/**/*"/>
|
---|
[28533] | 123 | <include name="gli/classes/META-INF"/>
|
---|
| 124 | <include name="gli/classes/META-INF/**/*"/>
|
---|
| 125 | <include name="gli/classes/images"/>
|
---|
| 126 | <include name="gli/classes/images/**/*"/>
|
---|
[23254] | 127 |
|
---|
| 128 | <!-- unix build files -->
|
---|
| 129 | <include name="acconfig.h"/>
|
---|
| 130 | <include name="aclocal.m4"/>
|
---|
| 131 | <include name="config.sub"/>
|
---|
| 132 | <include name="config.guess"/>
|
---|
| 133 | <include name="configtest.pl"/>
|
---|
| 134 | <include name="configure"/>
|
---|
| 135 | <include name="configure.in"/>
|
---|
| 136 | <include name="install-sh"/>
|
---|
| 137 | <include name="Makefile.in"/>
|
---|
| 138 | <include name="micotest.cpp"/>
|
---|
| 139 | <include name="config.h.in"/>
|
---|
| 140 | <include name="Install.txt"/>
|
---|
[28510] | 141 | <include name="makegs2.sh"/>
|
---|
[23254] | 142 |
|
---|
| 143 | <!-- windows build files -->
|
---|
| 144 | <include name="win32.mak"/>
|
---|
| 145 | <include name="win32cfg.h"/>
|
---|
[28510] | 146 | <include name="makegs2.bat"/>
|
---|
| 147 | <include name="makegs2x64.bat"/>
|
---|
[23254] | 148 | </patternset>
|
---|
| 149 |
|
---|
| 150 | <mkdir dir="distributions/source-component/uninstall"/>
|
---|
| 151 | <pstf dir="distributions/source-component" outfile="distributions/source-component/uninstall/source.uninstall" toplevelonly="true">
|
---|
| 152 | <patternset refid="source.patternset"/>
|
---|
| 153 | </pstf>
|
---|
| 154 |
|
---|
[19386] | 155 | <!-- unzip some windows packages -->
|
---|
[19600] | 156 | <unzip src="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/source-component/common-src/indexers/packages/windows/iconv"/>
|
---|
| 157 | <delete file="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip"/>
|
---|
[19386] | 158 |
|
---|
[19600] | 159 | <unzip src="distributions/source-component/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/common-src/packages/windows/crypt"/>
|
---|
| 160 | <delete file="distributions/source-component/common-src/packages/windows/crypt/crypt.zip"/>
|
---|
[19386] | 161 |
|
---|
[23221] | 162 | <if><bool><and>
|
---|
| 163 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
| 164 | <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
|
---|
| 165 | <islessthan arg1="${branch.tag.version}" arg2="2.84"/>
|
---|
| 166 | </and></bool>
|
---|
| 167 | <unzip src="distributions/source-component/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/common-src/packages/windows/expat"/>
|
---|
| 168 | <delete file="distributions/source-component/common-src/packages/windows/expat/expat.zip"/>
|
---|
| 169 | </if>
|
---|
[19386] | 170 |
|
---|
[19600] | 171 | <unzip src="distributions/source-component/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/common-src/packages/windows/stlport"/>
|
---|
| 172 | <delete file="distributions/source-component/common-src/packages/windows/stlport/stlport.zip"/>
|
---|
[19386] | 173 |
|
---|
[24474] | 174 | <exec executable="tar" dir="distributions/source-component/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-autoconf-3070602.tar.gz"/></exec>
|
---|
| 175 | <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-autoconf-3070602.tar.gz"/>
|
---|
[19386] | 176 |
|
---|
[19600] | 177 | <exec executable="tar" dir="distributions/source-component/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
|
---|
| 178 | <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
| 179 |
|
---|
[19566] | 180 | <!-- archive it -->
|
---|
| 181 | <delete file="products/Greenstone-${version}-source-component.zip"/>
|
---|
[19600] | 182 | <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
|
---|
| 183 | <exec dir="distributions/source-component" executable="bash">
|
---|
| 184 | <arg value="-c"/>
|
---|
| 185 | <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
|
---|
[19386] | 186 | </exec>
|
---|
| 187 |
|
---|
[21394] | 188 | </target>
|
---|
[19386] | 189 |
|
---|
[21652] | 190 | <target name="properties" depends="core-properties,gs2-properties"/>
|
---|
[21394] | 191 |
|
---|
[17950] | 192 | </project>
|
---|