source: main/trunk/release-kits/sork3/ant-scripts/build.xml@ 21202

Last change on this file since 21202 was 21202, checked in by oranfry, 14 years ago

updated code after the repository restructure

File size: 6.5 KB
RevLine 
[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"/>
[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"/>
[17968]75 <svn>
[21202]76 <export srcurl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="distributions/${dist.dirname}/gs2build/bin/windows"/>
[17968]77 </svn>
[19957]78 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
79 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
[17968]80 </target>
[17950]81
[17969]82 <target name="create-archives">
83 <mkdir dir="products"/>
[19957]84 <delete file="products/${dist.dirname}.zip"/>
85 <zip destfile="products/${dist.dirname}.zip" basedir="distributions" includes="${dist.dirname}/**/*"/>
[17973]86 <exec dir="distributions" executable="tar">
[19957]87 <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
[17973]88 </exec>
[17969]89 </target>
[17950]90
[19386]91 <target name="create-sourcecode">
92 <!-- create a directory for the sourcecode -->
[19957]93 <mkdir dir="distributions/source-component/gs2build"/>
[19386]94
95 <!-- copy the files in -->
[19957]96 <exec dir="distributions/${dist.dirname}" executable="cp">
[19386]97 <arg value="-r"/>
98
99 <!-- the bulk sourcecode -->
[19957]100 <arg value="gs2build/build-src"/>
101 <arg value="gs2build/common-src"/>
[19386]102
[19957]103 <!-- destination -->
104 <arg value="../source-component/gs2build"/>
[19386]105
[19957]106 </exec>
107
108 <!-- copy the files in -->
109 <exec dir="distributions/${dist.dirname}" executable="cp">
110 <arg value="-r"/>
[19386]111
[19957]112 <!-- the bulk sourcecode -->
113 <arg value="src"/>
114
[19386]115 <!-- destination -->
[19600]116 <arg value="../source-component"/>
[19386]117
118 </exec>
119
[20533]120 <!-- unzip some packages -->
[19957]121 <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"/>
122 <delete file="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip"/>
[19386]123
[19957]124 <unzip src="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/crypt"/>
125 <delete file="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip"/>
[19386]126
[19957]127 <unzip src="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/expat"/>
128 <delete file="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip"/>
[19386]129
[19957]130 <unzip src="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/stlport"/>
131 <delete file="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip"/>
[19386]132
[19957]133 <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>
134 <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
[19386]135
[19957]136 <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
137 <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
[19600]138
[19566]139 <!-- archive it -->
140 <delete file="products/Greenstone-${version}-source-component.zip"/>
[19600]141 <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
142 <exec dir="distributions/source-component" executable="bash">
143 <arg value="-c"/>
144 <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
[19386]145 </exec>
146 </target>
147
[17950]148</project>
Note: See TracBrowser for help on using the repository browser.