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
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-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 <svn>
76 <export srcurl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="distributions/${dist.dirname}/gs2build/bin/windows"/>
77 </svn>
78 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/>
79 <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/>
80 </target>
81
82 <target name="create-archives">
83 <mkdir dir="products"/>
84 <delete file="products/${dist.dirname}.zip"/>
85 <zip destfile="products/${dist.dirname}.zip" basedir="distributions" includes="${dist.dirname}/**/*"/>
86 <exec dir="distributions" executable="tar">
87 <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/>
88 </exec>
89 </target>
90
91 <target name="create-sourcecode">
92 <!-- create a directory for the sourcecode -->
93 <mkdir dir="distributions/source-component/gs2build"/>
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="gs2build/build-src"/>
101 <arg value="gs2build/common-src"/>
102
103 <!-- destination -->
104 <arg value="../source-component/gs2build"/>
105
106 </exec>
107
108 <!-- copy the files in -->
109 <exec dir="distributions/${dist.dirname}" executable="cp">
110 <arg value="-r"/>
111
112 <!-- the bulk sourcecode -->
113 <arg value="src"/>
114
115 <!-- destination -->
116 <arg value="../source-component"/>
117
118 </exec>
119
120 <!-- unzip some packages -->
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"/>
123
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"/>
126
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"/>
129
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"/>
132
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"/>
135
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"/>
138
139 <!-- archive it -->
140 <delete file="products/Greenstone-${version}-source-component.zip"/>
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 *"/>
145 </exec>
146 </target>
147
148</project>
Note: See TracBrowser for help on using the repository browser.