[17950] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <!--
|
---|
| 3 | ..........................................................
|
---|
[19954] | 4 | July 2009
|
---|
| 5 | Source Release Kit for Greenstone3 (sork3)
|
---|
[17950] | 6 | Oran Fry
|
---|
| 7 | ..........................................................
|
---|
| 8 | -->
|
---|
| 9 |
|
---|
[19954] | 10 | <project name="sork3-build" default="sork3">
|
---|
[17950] | 11 |
|
---|
| 12 | <!-- CONSTANTS -->
|
---|
| 13 |
|
---|
[19039] | 14 | <!-- for the benefit of the shared scripts, set release-kit home -->
|
---|
[19954] | 15 | <property name="rk.name" value="sork3"/>
|
---|
| 16 | <property name="rk.home" value="${sork3.home}" />
|
---|
[17950] | 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/core/ant-scripts/operations-on-gli.xml"/>
|
---|
| 23 | <import file="${rk.home}/shared/greenstone3/ant-scripts/greenstone3-shared.xml"/>
|
---|
[17950] | 24 |
|
---|
[19957] | 25 | <!-- helper constant -->
|
---|
| 26 | <property name="dist.dirname" value="Greenstone-${version}-source-distribution"/>
|
---|
| 27 |
|
---|
[17950] | 28 | <!-- THE MAIN TARGET -->
|
---|
[19957] | 29 | <target name="sork3" depends="init">
|
---|
| 30 | <antcall target="export-greenstone3"><param name="dest" value="distributions/${dist.dirname}"/></antcall>
|
---|
| 31 | <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distributions/${dist.dirname}"/></antcall>
|
---|
| 32 | <ant dir="distributions/${dist.dirname}" target="prepare">
|
---|
| 33 | <property name="properties.accepted" value="true"/>
|
---|
| 34 | <property name="app.version" value="${version}"/>
|
---|
| 35 | </ant>
|
---|
| 36 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.dirname}/gli"/></antcall>
|
---|
[17972] | 37 | <antcall target="insert-winbin"/>
|
---|
[20533] | 38 | <antcall target="insert-ant"/>
|
---|
[19957] | 39 | <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/${dist.dirname}/gs2build/bin/windows"/></antcall>
|
---|
[19954] | 40 | <antcall target="tweak-files"/>
|
---|
[20533] | 41 | <ant dir="distributions/${dist.dirname}">
|
---|
| 42 | <target name="fix-execute-permissions"/>
|
---|
| 43 | <target name="fix-execute-permissions-source"/>
|
---|
| 44 | </ant>
|
---|
[17950] | 45 | <antcall target="create-archives"/>
|
---|
[19974] | 46 | <ant dir="." antfile="${sork3.home}/ant-scripts/create-sourcecode-component.xml" target="create-sourcecode-component"/>
|
---|
[17950] | 47 | </target>
|
---|
| 48 |
|
---|
[19039] | 49 | <target name="properties">
|
---|
| 50 | <echo>Required Properties:</echo>
|
---|
| 51 | <echo>version the version string for the release</echo>
|
---|
| 52 | <echo/>
|
---|
| 53 |
|
---|
| 54 | <echo>Optional Properties:</echo>
|
---|
| 55 | <echo>branch.path the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo>
|
---|
| 56 | <echo>branch.revision the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo>
|
---|
| 57 | <echo/>
|
---|
| 58 | </target>
|
---|
| 59 |
|
---|
| 60 |
|
---|
[17950] | 61 | <target name="tweak-files">
|
---|
[19957] | 62 | <delete file="distributions/${dist.dirname}/gs2build/bin/linux/mgquery_old" />
|
---|
[20533] | 63 | <delete file="distributions/${dist.dirname}/build.properties.in"/>
|
---|
| 64 | <delete><fileset dir="distributions/${dist.dirname}/packages" includes="**/*.zip,**/*.tar.gz"/></delete>
|
---|
[17950] | 65 | </target>
|
---|
| 66 |
|
---|
[20533] | 67 | <target name="insert-ant">
|
---|
| 68 | <copy todir="distributions/${dist.dirname}/packages/ant">
|
---|
| 69 | <fileset dir="${rk.home}/core/ant"/>
|
---|
| 70 | </copy>
|
---|
| 71 | </target>
|
---|
| 72 |
|
---|
[17968] | 73 | <target name="insert-winbin">
|
---|
[19957] | 74 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/>
|
---|
[21648] | 75 | <exec executable="svn">
|
---|
| 76 | <arg value="export"/>
|
---|
| 77 | <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
|
---|
| 78 | <arg value="distributions/${dist.dirname}/gs2build/bin/windows"/>
|
---|
| 79 | </exec>
|
---|
[19957] | 80 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
|
---|
| 81 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
|
---|
[17968] | 82 | </target>
|
---|
[17950] | 83 |
|
---|
[17969] | 84 | <target name="create-archives">
|
---|
| 85 | <mkdir dir="products"/>
|
---|
[19957] | 86 | <delete file="products/${dist.dirname}.zip"/>
|
---|
| 87 | <zip destfile="products/${dist.dirname}.zip" basedir="distributions" includes="${dist.dirname}/**/*"/>
|
---|
[17973] | 88 | <exec dir="distributions" executable="tar">
|
---|
[19957] | 89 | <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
|
---|
[17973] | 90 | </exec>
|
---|
[17969] | 91 | </target>
|
---|
[17950] | 92 |
|
---|
[19386] | 93 | <target name="create-sourcecode">
|
---|
| 94 | <!-- create a directory for the sourcecode -->
|
---|
[19957] | 95 | <mkdir dir="distributions/source-component/gs2build"/>
|
---|
[19386] | 96 |
|
---|
| 97 | <!-- copy the files in -->
|
---|
[19957] | 98 | <exec dir="distributions/${dist.dirname}" executable="cp">
|
---|
[19386] | 99 | <arg value="-r"/>
|
---|
| 100 |
|
---|
| 101 | <!-- the bulk sourcecode -->
|
---|
[19957] | 102 | <arg value="gs2build/build-src"/>
|
---|
| 103 | <arg value="gs2build/common-src"/>
|
---|
[19386] | 104 |
|
---|
[19957] | 105 | <!-- destination -->
|
---|
| 106 | <arg value="../source-component/gs2build"/>
|
---|
[19386] | 107 |
|
---|
[19957] | 108 | </exec>
|
---|
| 109 |
|
---|
| 110 | <!-- copy the files in -->
|
---|
| 111 | <exec dir="distributions/${dist.dirname}" executable="cp">
|
---|
| 112 | <arg value="-r"/>
|
---|
[19386] | 113 |
|
---|
[19957] | 114 | <!-- the bulk sourcecode -->
|
---|
| 115 | <arg value="src"/>
|
---|
| 116 |
|
---|
[19386] | 117 | <!-- destination -->
|
---|
[19600] | 118 | <arg value="../source-component"/>
|
---|
[19386] | 119 |
|
---|
| 120 | </exec>
|
---|
| 121 |
|
---|
[20533] | 122 | <!-- unzip some packages -->
|
---|
[19957] | 123 | <unzip src="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv"/>
|
---|
| 124 | <delete file="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip"/>
|
---|
[19386] | 125 |
|
---|
[19957] | 126 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/crypt"/>
|
---|
| 127 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip"/>
|
---|
[19386] | 128 |
|
---|
[19957] | 129 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/expat"/>
|
---|
| 130 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip"/>
|
---|
[19386] | 131 |
|
---|
[19957] | 132 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/stlport"/>
|
---|
| 133 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip"/>
|
---|
[19386] | 134 |
|
---|
[19957] | 135 | <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-amalgamation-3.5.9.tar.gz"/></exec>
|
---|
| 136 | <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
[19386] | 137 |
|
---|
[19957] | 138 | <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
|
---|
| 139 | <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
[19600] | 140 |
|
---|
[19566] | 141 | <!-- archive it -->
|
---|
| 142 | <delete file="products/Greenstone-${version}-source-component.zip"/>
|
---|
[19600] | 143 | <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
|
---|
| 144 | <exec dir="distributions/source-component" executable="bash">
|
---|
| 145 | <arg value="-c"/>
|
---|
| 146 | <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
|
---|
[19386] | 147 | </exec>
|
---|
| 148 | </target>
|
---|
| 149 |
|
---|
[17950] | 150 | </project>
|
---|