[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 -->
|
---|
[19006] | 21 | <import file="../core/ant-scripts/init.xml"/>
|
---|
| 22 | <import file="../core/ant-scripts/operations-on-gli.xml"/>
|
---|
[19954] | 23 | <import file="../greenstone3/ant-scripts/rk3-targets.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"/>
|
---|
[19957] | 38 | <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/${dist.dirname}/gs2build/bin/windows"/></antcall>
|
---|
[19954] | 39 | <antcall target="tweak-files"/>
|
---|
[17950] | 40 | <antcall target="create-archives"/>
|
---|
[19386] | 41 | <antcall target="create-sourcecode"/>
|
---|
[17950] | 42 | </target>
|
---|
| 43 |
|
---|
[19039] | 44 | <target name="properties">
|
---|
| 45 | <echo>Required Properties:</echo>
|
---|
| 46 | <echo>version the version string for the release</echo>
|
---|
| 47 | <echo/>
|
---|
| 48 |
|
---|
| 49 | <echo>Optional Properties:</echo>
|
---|
| 50 | <echo>branch.path the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo>
|
---|
| 51 | <echo>branch.revision the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo>
|
---|
| 52 | <echo/>
|
---|
| 53 | </target>
|
---|
| 54 |
|
---|
| 55 |
|
---|
[17950] | 56 | <target name="tweak-files">
|
---|
[19957] | 57 | <delete file="distributions/${dist.dirname}/gs2build/bin/linux/mgquery_old" />
|
---|
[17950] | 58 | </target>
|
---|
| 59 |
|
---|
[17968] | 60 | <target name="insert-winbin">
|
---|
[19957] | 61 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/>
|
---|
[17968] | 62 | <svn>
|
---|
[19957] | 63 | <export srcurl="${svn.root}/other-projects/trunk/winbin/bin" destPath="distributions/${dist.dirname}/gs2build/bin/windows"/>
|
---|
[17968] | 64 | </svn>
|
---|
[19957] | 65 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
|
---|
| 66 | <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
|
---|
[17968] | 67 | </target>
|
---|
[17950] | 68 |
|
---|
[17969] | 69 | <target name="create-archives">
|
---|
| 70 | <mkdir dir="products"/>
|
---|
[19957] | 71 | <delete file="products/${dist.dirname}.zip"/>
|
---|
| 72 | <zip destfile="products/${dist.dirname}.zip" basedir="distributions" includes="${dist.dirname}/**/*"/>
|
---|
[17973] | 73 | <exec dir="distributions" executable="tar">
|
---|
[19957] | 74 | <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
|
---|
[17973] | 75 | </exec>
|
---|
[17969] | 76 | </target>
|
---|
[17950] | 77 |
|
---|
[19386] | 78 | <target name="create-sourcecode">
|
---|
| 79 | <!-- create a directory for the sourcecode -->
|
---|
[19957] | 80 | <mkdir dir="distributions/source-component/gs2build"/>
|
---|
[19386] | 81 |
|
---|
| 82 | <!-- copy the files in -->
|
---|
[19957] | 83 | <exec dir="distributions/${dist.dirname}" executable="cp">
|
---|
[19386] | 84 | <arg value="-r"/>
|
---|
| 85 |
|
---|
| 86 | <!-- the bulk sourcecode -->
|
---|
[19957] | 87 | <arg value="gs2build/build-src"/>
|
---|
| 88 | <arg value="gs2build/common-src"/>
|
---|
[19386] | 89 |
|
---|
[19957] | 90 | <!-- destination -->
|
---|
| 91 | <arg value="../source-component/gs2build"/>
|
---|
[19386] | 92 |
|
---|
[19957] | 93 | </exec>
|
---|
| 94 |
|
---|
| 95 | <!-- copy the files in -->
|
---|
| 96 | <exec dir="distributions/${dist.dirname}" executable="cp">
|
---|
| 97 | <arg value="-r"/>
|
---|
[19386] | 98 |
|
---|
[19957] | 99 | <!-- the bulk sourcecode -->
|
---|
| 100 | <arg value="src"/>
|
---|
| 101 |
|
---|
[19386] | 102 | <!-- destination -->
|
---|
[19600] | 103 | <arg value="../source-component"/>
|
---|
[19386] | 104 |
|
---|
| 105 | </exec>
|
---|
| 106 |
|
---|
| 107 | <!-- unzip some windows packages -->
|
---|
[19957] | 108 | <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"/>
|
---|
| 109 | <delete file="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip"/>
|
---|
[19386] | 110 |
|
---|
[19957] | 111 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/crypt"/>
|
---|
| 112 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip"/>
|
---|
[19386] | 113 |
|
---|
[19957] | 114 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/expat"/>
|
---|
| 115 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip"/>
|
---|
[19386] | 116 |
|
---|
[19957] | 117 | <unzip src="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/stlport"/>
|
---|
| 118 | <delete file="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip"/>
|
---|
[19386] | 119 |
|
---|
[19957] | 120 | <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>
|
---|
| 121 | <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
[19386] | 122 |
|
---|
[19957] | 123 | <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
|
---|
| 124 | <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
[19600] | 125 |
|
---|
[19566] | 126 | <!-- archive it -->
|
---|
| 127 | <delete file="products/Greenstone-${version}-source-component.zip"/>
|
---|
[19600] | 128 | <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
|
---|
| 129 | <exec dir="distributions/source-component" executable="bash">
|
---|
| 130 | <arg value="-c"/>
|
---|
| 131 | <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
|
---|
[19386] | 132 | </exec>
|
---|
| 133 | </target>
|
---|
| 134 |
|
---|
| 135 |
|
---|
[17950] | 136 | </project>
|
---|