root/release-kits/sork3/ant-scripts/build.xml @ 19957

Revision 19957, 5.9 KB (checked in by oranfry, 11 years ago)

first working sork3

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        July 2009
5        Source Release Kit for Greenstone3 (sork3)
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="sork3-build" default="sork3">
11
12    <!-- CONSTANTS -->
13
14    <!-- for the benefit of the shared scripts, set release-kit home -->
15    <property name="rk.name" value="sork3"/>
16    <property name="rk.home" value="${sork3.home}" />
17    <property name="rk.os" value="multi" />
18    <property name="os.suffix" value="AnyPlatform"/>
19   
20    <!-- IMPORT OTHER ANT SCRIPTS -->
21    <import file="../core/ant-scripts/init.xml"/>
22    <import file="../core/ant-scripts/operations-on-gli.xml"/>
23    <import file="../greenstone3/ant-scripts/rk3-targets.xml"/>
24
25    <!-- helper constant -->
26    <property name="dist.dirname" value="Greenstone-${version}-source-distribution"/>
27
28    <!-- THE MAIN TARGET -->
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>
37        <antcall target="insert-winbin"/>
38        <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/${dist.dirname}/gs2build/bin/windows"/></antcall>
39        <antcall target="tweak-files"/>
40        <antcall target="create-archives"/>
41        <antcall target="create-sourcecode"/>
42    </target>
43
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
56    <target name="tweak-files">
57        <delete file="distributions/${dist.dirname}/gs2build/bin/linux/mgquery_old" />
58    </target>
59
60    <target name="insert-winbin">
61        <delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/>
62        <svn>
63            <export srcurl="${svn.root}/other-projects/trunk/winbin/bin" destPath="distributions/${dist.dirname}/gs2build/bin/windows"/>
64        </svn>
65        <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
66        <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
67    </target>
68
69    <target name="create-archives">
70        <mkdir dir="products"/>
71        <delete file="products/${dist.dirname}.zip"/>
72        <zip destfile="products/${dist.dirname}.zip"  basedir="distributions" includes="${dist.dirname}/**/*"/>
73        <exec dir="distributions" executable="tar">
74            <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
75        </exec>
76    </target>
77
78    <target name="create-sourcecode">
79        <!-- create a directory for the sourcecode -->
80        <mkdir dir="distributions/source-component/gs2build"/>
81
82        <!-- copy the files in -->
83        <exec dir="distributions/${dist.dirname}" executable="cp">
84            <arg value="-r"/>
85
86            <!-- the bulk sourcecode -->
87            <arg value="gs2build/build-src"/>
88            <arg value="gs2build/common-src"/>
89
90            <!-- destination -->
91            <arg value="../source-component/gs2build"/>
92
93        </exec>
94       
95        <!-- copy the files in -->
96        <exec dir="distributions/${dist.dirname}" executable="cp">
97            <arg value="-r"/>
98
99            <!-- the bulk sourcecode -->
100            <arg value="src"/>
101
102            <!-- destination -->
103            <arg value="../source-component"/>
104
105        </exec>
106
107        <!-- unzip some windows packages -->
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"/>
110       
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"/>
113       
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"/>
116       
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"/>
119
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"/>
122
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"/>
125
126        <!-- archive it -->
127        <delete file="products/Greenstone-${version}-source-component.zip"/>
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 *"/>
132        </exec>
133    </target>
134
135
136</project>
Note: See TracBrowser for help on using the browser.