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

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

tidy-ups

File size: 6.6 KB
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="${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"/>
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-ant"/>
39 <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/${dist.dirname}/gs2build/bin/windows"/></antcall>
40 <antcall target="tweak-files"/>
41 <ant dir="distributions/${dist.dirname}">
42 <target name="fix-execute-permissions"/>
43 <target name="fix-execute-permissions-source"/>
44 </ant>
45 <antcall target="create-archives"/>
46 <ant dir="." antfile="${sork3.home}/ant-scripts/create-sourcecode-component.xml" target="create-sourcecode-component"/>
47 </target>
48
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
61 <target name="tweak-files">
62 <delete file="distributions/${dist.dirname}/gs2build/bin/linux/mgquery_old" />
63 <delete file="distributions/${dist.dirname}/build.properties.in"/>
64 <delete><fileset dir="distributions/${dist.dirname}/packages" includes="**/*.zip,**/*.tar.gz"/></delete>
65 </target>
66
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
73 <target name="insert-winbin">
74 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/>
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>
80 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
81 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
82 </target>
83
84 <target name="create-archives">
85 <mkdir dir="products"/>
86 <delete file="products/${dist.dirname}.zip"/>
87 <zip destfile="products/${dist.dirname}.zip" basedir="distributions" includes="${dist.dirname}/**/*"/>
88 <exec dir="distributions" executable="tar">
89 <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
90 </exec>
91 </target>
92
93 <target name="create-sourcecode">
94 <!-- create a directory for the sourcecode -->
95 <mkdir dir="distributions/source-component/gs2build"/>
96
97 <!-- copy the files in -->
98 <exec dir="distributions/${dist.dirname}" executable="cp">
99 <arg value="-r"/>
100
101 <!-- the bulk sourcecode -->
102 <arg value="gs2build/build-src"/>
103 <arg value="gs2build/common-src"/>
104
105 <!-- destination -->
106 <arg value="../source-component/gs2build"/>
107
108 </exec>
109
110 <!-- copy the files in -->
111 <exec dir="distributions/${dist.dirname}" executable="cp">
112 <arg value="-r"/>
113
114 <!-- the bulk sourcecode -->
115 <arg value="src"/>
116
117 <!-- destination -->
118 <arg value="../source-component"/>
119
120 </exec>
121
122 <!-- unzip some packages -->
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"/>
125
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"/>
128
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"/>
131
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"/>
134
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"/>
137
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"/>
140
141 <!-- archive it -->
142 <delete file="products/Greenstone-${version}-source-component.zip"/>
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 *"/>
147 </exec>
148 </target>
149
150</project>
Note: See TracBrowser for help on using the repository browser.