source: main/trunk/release-kits/kits/sork2/ant-scripts/build.xml@ 37346

Last change on this file since 37346 was 37346, checked in by kjdon, 14 months ago

added in the global-svn-args line to svn tasks in some other release kits

File size: 8.2 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3 ..........................................................
4 November 2008
5 Source Release Kit for Greenstone2 (sork2)
6 Oran Fry
7 ..........................................................
8-->
9
10<project name="sork2-build" default="sork2">
11
12 <!-- IMPORT OTHER ANT SCRIPTS -->
13 <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
14 <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
15
16 <!-- THE MAIN TARGET -->
17 <target name="sork2" depends="init">
18
19 <!-- store the name of the distribution -->
20 <property name="dist.name" value="Greenstone-${version}-source-distribution"/>
21
22 <!-- create distributions dir -->
23 <mkdir dir="distributions"/>
24
25 <!-- export greenstone2 and gli -->
26 <exec executable="svn"><arg line="${global-svn-args}"/><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone2"/><arg value="distributions/${dist.name}"/></exec>
27 <exec executable="svn"><arg line="${global-svn-args}"/><arg value="export"/><arg value="${svn.root}/main/${branch.path}/gli"/><arg value="distributions/${dist.name}/gli"/></exec>
28
29 <!-- set version numbers -->
30 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/${dist.name}"/></antcall>
31 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall>
32
33 <!-- insert windows binaries -->
34 <delete dir="distributions/${dist.name}/bin/windows"/>
35 <exec executable="svn">
36 <arg line="${global-svn-args}"/>
37 <arg value="export"/>
38 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
39 <arg value="distributions/${dist.name}/bin/windows"/>
40 </exec>
41 <!--<get src="${server.exe.location}" dest="distributions/${dist.name}/bin/windows/server.exe"/>-->
42 <exec executable="wget" failonerror="true">
43 <arg value="-P"/>
44 <arg value="distributions/${dist.name}/bin/windows/"/>
45 <arg value="--no-check-certificate"/>
46 <arg value="${server.exe.location}"/>
47 </exec>
48 <move file="distributions/${dist.name}/bin/windows/latest-server.exe"
49 tofile="distributions/${dist.name}/bin/windows/server.exe"/>
50
51 <delete dir="distributions/${dist.name}/bin/windows/imagemagick"/>
52 <delete dir="distributions/${dist.name}/bin/windows/ghostscript"/>
53
54 <!-- insert windows perl -->
55 <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/bin/windows"/>
56
57 <!-- clean up -->
58 <delete file="distributions/${dist.name}/bin/linux/mgquery_old" />
59
60 <!-- create the archives (source code distribution) -->
61 <mkdir dir="products"/>
62 <delete file="products/${dist.name}.zip"/>
63 <zip destfile="products/${dist.name}.zip" basedir="distributions" includes="${dist.name}/**/*"/>
64 <exec dir="distributions" executable="tar">
65 <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/>
66 </exec>
67
68 <!-- CREATE THE SOURCE CODE COMPONENT (SOURCE CODE TOP-UP TO THE BINARY RELEASE) -->
69
70 <!-- create a directory for the sourcecode -->
71 <mkdir dir="distributions/source-component"/>
72 <mkdir dir="distributions/source-component/gli"/>
73 <mkdir dir="distributions/source-component/gli/classes"/>
74
75 <!-- copy the files in -->
76 <exec dir="distributions/${dist.name}" executable="cp">
77 <arg value="-r"/>
78
79 <!-- the bulk sourcecode -->
80 <arg value="build-src"/>
81 <arg value="common-src"/>
82 <arg value="runtime-src"/>
83
84 <!-- unix build files -->
85 <arg value="acconfig.h"/>
86 <arg value="aclocal.m4"/>
87 <arg value="config.sub"/>
88 <arg value="config.guess"/>
89 <arg value="configtest.pl"/>
90 <arg value="configure"/>
91 <arg value="configure.in"/>
92 <arg value="install-sh"/>
93 <arg value="Makefile.in"/>
94 <arg value="micotest.cpp"/>
95 <arg value="config.h.in"/>
96 <arg value="Install.txt"/>
97 <arg value="makegs2.sh"/>
98
99 <!-- windows build files -->
100 <arg value="win32.mak"/>
101 <arg value="win32cfg.h"/>
102 <arg value="makegs2.bat"/>
103 <arg value="makegs2x64.bat"/>
104
105 <!-- destination -->
106 <arg value="../source-component"/>
107 </exec>
108
109 <!-- also copy in the gli src folder into the src component and classes/images and classes/META-INF for generating jars -->
110 <exec dir="distributions/${dist.name}" executable="cp">
111 <arg value="-r"/>
112 <arg value="gli/src"/>
113 <!-- destination -->
114 <arg value="../source-component/gli"/>
115 </exec>
116 <exec dir="distributions/${dist.name}" executable="cp">
117 <arg value="-r"/>
118 <arg value="gli/classes/images"/>
119 <arg value="gli/classes/META-INF"/>
120 <!-- destination -->
121 <arg value="../source-component/gli/classes"/>
122 </exec>
123
124 <patternset id="source.patternset">
125 <include name="build-src"/>
126 <include name="build-src/**/*"/>
127 <include name="common-src"/>
128 <include name="common-src/**/*"/>
129 <include name="runtime-src"/>
130 <include name="runtime-src/**/*"/>
131 <include name="gli/src"/>
132 <include name="gli/src/**/*"/>
133 <include name="gli/classes/META-INF"/>
134 <include name="gli/classes/META-INF/**/*"/>
135 <include name="gli/classes/images"/>
136 <include name="gli/classes/images/**/*"/>
137
138 <!-- unix build files -->
139 <include name="acconfig.h"/>
140 <include name="aclocal.m4"/>
141 <include name="config.sub"/>
142 <include name="config.guess"/>
143 <include name="configtest.pl"/>
144 <include name="configure"/>
145 <include name="configure.in"/>
146 <include name="install-sh"/>
147 <include name="Makefile.in"/>
148 <include name="micotest.cpp"/>
149 <include name="config.h.in"/>
150 <include name="Install.txt"/>
151 <include name="makegs2.sh"/>
152
153 <!-- windows build files -->
154 <include name="win32.mak"/>
155 <include name="win32cfg.h"/>
156 <include name="makegs2.bat"/>
157 <include name="makegs2x64.bat"/>
158 </patternset>
159
160 <mkdir dir="distributions/source-component/uninstall"/>
161 <pstf dir="distributions/source-component" outfile="distributions/source-component/uninstall/source.uninstall" toplevelonly="true">
162 <patternset refid="source.patternset"/>
163 </pstf>
164
165 <!-- unzip some windows packages -->
166 <unzip src="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv-PRE-VS14.zip" dest="distributions/source-component/common-src/indexers/packages/windows/iconv"/>
167 <delete file="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv-PRE-VS14.zip"/>
168
169 <unzip src="distributions/source-component/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/common-src/packages/windows/crypt"/>
170 <delete file="distributions/source-component/common-src/packages/windows/crypt/crypt.zip"/>
171
172 <if><bool><and>
173 <not><equals arg1="${branch.path}" arg2="trunk"/></not>
174 <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
175 <islessthan arg1="${branch.tag.version}" arg2="2.84"/>
176 </and></bool>
177 <unzip src="distributions/source-component/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/common-src/packages/windows/expat"/>
178 <delete file="distributions/source-component/common-src/packages/windows/expat/expat.zip"/>
179 </if>
180
181 <unzip src="distributions/source-component/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/common-src/packages/windows/stlport"/>
182 <delete file="distributions/source-component/common-src/packages/windows/stlport/stlport.zip"/>
183
184 <exec executable="tar" dir="distributions/source-component/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-autoconf-3070602.tar.gz"/></exec>
185 <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-autoconf-3070602.tar.gz"/>
186
187 <exec executable="tar" dir="distributions/source-component/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
188 <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
189
190 <!-- archive it -->
191 <delete file="products/Greenstone-${version}-source-component.zip"/>
192 <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
193 <exec dir="distributions/source-component" executable="bash">
194 <arg value="-c"/>
195 <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
196 </exec>
197
198 </target>
199
200 <target name="properties" depends="core-properties,gs2-properties"/>
201
202</project>
Note: See TracBrowser for help on using the repository browser.