1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | ..........................................................
|
---|
5 | September 2007
|
---|
6 | Greenstone3 'release maker' script
|
---|
7 | Oran Fry
|
---|
8 | ..........................................................
|
---|
9 | -->
|
---|
10 |
|
---|
11 | <project name="gs3-release-maker" default="help">
|
---|
12 |
|
---|
13 | <!-- classpath -->
|
---|
14 | <path id="project.classpath">
|
---|
15 | <fileset dir="tasks">
|
---|
16 | <include name="**/*.jar"/>
|
---|
17 | </fileset>
|
---|
18 | <fileset dir="lib">
|
---|
19 | <include name="*.jar"/>
|
---|
20 | </fileset>
|
---|
21 | <pathelement path="tasks/orans"/>
|
---|
22 | </path>
|
---|
23 |
|
---|
24 | <!-- svn root -->
|
---|
25 | <property name="svn.root" value="http://svn.greenstone.org"/>
|
---|
26 |
|
---|
27 | <!-- self defined tasks -->
|
---|
28 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
29 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
30 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
31 | <taskdef name="setloglevel" classname="SetLogLevel" classpathref="project.classpath"/>
|
---|
32 | <typedef name="addressedcall" classname="TreeCallTarget" classpathref="project.classpath"/>
|
---|
33 | <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
|
---|
34 | <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.SCP" classpathref="project.classpath"/>
|
---|
35 | <taskdef name="sshexec" classname="org.apache.tools.ant.taskdefs.optional.SSHExec" classpathref="project.classpath"/>
|
---|
36 |
|
---|
37 |
|
---|
38 | <!-- target relations
|
---|
39 | <typedef name="isafter" classname="IsAfter" classpathref="project.classpath"/>
|
---|
40 | <typedef name="isdescendantof" classname="IsDescendantOf" classpathref="project.classpath"/>
|
---|
41 | <typedef name="isbetweenyandroot" classname="IsBetweenYAndRoot" classpathref="project.classpath"/> -->
|
---|
42 |
|
---|
43 |
|
---|
44 | <!-- load in static properties from build.properties -->
|
---|
45 | <property file="build.properties" />
|
---|
46 |
|
---|
47 | <!-- stuff to do before all tasks -->
|
---|
48 | <target name="init">
|
---|
49 |
|
---|
50 | <echo level="info">CHECKING PRE-CONDITIONS</echo>
|
---|
51 | <echo level="info"/>
|
---|
52 |
|
---|
53 | <!-- version number -->
|
---|
54 | <echo level="info">Checking if version number is set...</echo>
|
---|
55 | <if>
|
---|
56 | <bool>
|
---|
57 | <or>
|
---|
58 | <not><isset property="version"/></not>
|
---|
59 | <not><isset property="version.minor"/></not>
|
---|
60 | </or>
|
---|
61 | </bool>
|
---|
62 | <echo level="error">No, not set</echo>
|
---|
63 | <echo level="error">Please specify a version number</echo>
|
---|
64 | <echo level="error">E.g., ant -Dversion=3.03 -Dversion.minor=03 create-release</echo>
|
---|
65 | <echo level="error">or, ant -Dversion=trunk -Dversion.minor=03 create-release</echo>
|
---|
66 | <fail>Version number not set</fail>
|
---|
67 | </if>
|
---|
68 | <echo level="info">Version number: ${version}</echo>
|
---|
69 | <property name="app.version" value="${version}"/>
|
---|
70 | <echo level="info"/>
|
---|
71 |
|
---|
72 | <!-- where to put the release -->
|
---|
73 | <echo level="info">Determining where to put the release...</echo>
|
---|
74 | <if>
|
---|
75 | <bool>
|
---|
76 | <or>
|
---|
77 | <not><isset property="release.dir"/></not>
|
---|
78 | <not><isset property="mac.release.dir"/></not>
|
---|
79 | <not><isset property="windows.release.dir"/></not>
|
---|
80 | </or>
|
---|
81 |
|
---|
82 | </bool>
|
---|
83 | <echo level="error">No release directory specified.</echo>
|
---|
84 | <echo level="error">Please specify release directory on the command line.</echo>
|
---|
85 | <echo level="error">E.g., ant -Drelease.dir=/research/me/releases/3.03 -Dmac.release.dir=/Users/me/releases/3.03 -Dwindows.release.dir=c:\research\me\releases\3.03 create-release</echo>
|
---|
86 | <fail>Release directorys not set</fail>
|
---|
87 | </if>
|
---|
88 | <echo level="info">Release directory: ${release.dir}</echo>
|
---|
89 | <echo level="info">Mac release directory: ${mac.release.dir}</echo>
|
---|
90 | <echo level="info">Windows release directory: ${windows.release.dir}</echo>
|
---|
91 | <echo level="info"/>
|
---|
92 |
|
---|
93 | <!-- check start from -->
|
---|
94 | <echo level="info">Checking if we are resuming from a given target...</echo>
|
---|
95 | <if>
|
---|
96 | <bool>
|
---|
97 | <not><isset property="resume.from"/></not>
|
---|
98 | </bool>
|
---|
99 | <echo level="info">No, start from the beginning</echo>
|
---|
100 | <property name="resume.from" value="1"/>
|
---|
101 | <else>
|
---|
102 | <echo level="info">Yes, resuming from ${resume.from}</echo>
|
---|
103 | </else>
|
---|
104 | </if>
|
---|
105 | <echo level="info"/>
|
---|
106 |
|
---|
107 | <!-- check resume mode-->
|
---|
108 | <echo level="info">Determining resume mode...</echo>
|
---|
109 | <if>
|
---|
110 | <bool>
|
---|
111 | <not><isset property="resume.mode"/></not>
|
---|
112 | </bool>
|
---|
113 | <echo level="info">Mode not set, defaulting to 'fallthrough'</echo>
|
---|
114 | <property name="resume.mode" value="fallthrough"/>
|
---|
115 | <else>
|
---|
116 | <echo level="info">Mode set to ${resume.mode}</echo>
|
---|
117 | <if>
|
---|
118 | <bool>
|
---|
119 | <and>
|
---|
120 | <not><equals arg1="${resume.mode}" arg2="descend"/></not>
|
---|
121 | <not><equals arg1="${resume.mode}" arg2="fallthrough"/></not>
|
---|
122 | </and>
|
---|
123 | </bool>
|
---|
124 | <echo level="error">You have not specified a valid resume mode.</echo>
|
---|
125 | <echo level="error">Valid modes are 'fallthrough' and 'descend'.</echo>
|
---|
126 | <fail>You have not specified a valid resume mode.</fail>
|
---|
127 | </if>
|
---|
128 | </else>
|
---|
129 | </if>
|
---|
130 | <echo level="info"/>
|
---|
131 |
|
---|
132 | <!-- check username and password -->
|
---|
133 | <echo level="info">Checking if username and password set...</echo>
|
---|
134 | <if>
|
---|
135 | <bool>
|
---|
136 | <not><isset property="username"/></not>
|
---|
137 | </bool>
|
---|
138 | <echo level="info">Not set</echo>
|
---|
139 | <fail>You have not specified a username for ssh</fail>
|
---|
140 | </if>
|
---|
141 | <echo level="info"/>
|
---|
142 |
|
---|
143 | <!-- execute target code or just traverse tree -->
|
---|
144 | <echo level="info">Determining execute mode...</echo>
|
---|
145 | <if>
|
---|
146 | <bool>
|
---|
147 | <not><isset property="execute"/></not>
|
---|
148 | </bool>
|
---|
149 | <echo level="info">Execute not set, defaulting to 'true'</echo>
|
---|
150 | <property name="execute" value="true"/>
|
---|
151 | <else>
|
---|
152 | <echo level="info">Execute set to ${execute}</echo>
|
---|
153 | <if>
|
---|
154 | <bool>
|
---|
155 | <and>
|
---|
156 | <not><equals arg1="${execute}" arg2="true"/></not>
|
---|
157 | <not><equals arg1="${execute}" arg2="false"/></not>
|
---|
158 | </and>
|
---|
159 | </bool>
|
---|
160 | <echo level="error">You have not specified a valid value for execute.</echo>
|
---|
161 | <echo level="error">Valid values are 'true' and 'false'.</echo>
|
---|
162 | <fail>You have not specified a valid value for execute.</fail>
|
---|
163 | </if>
|
---|
164 | </else>
|
---|
165 | </if>
|
---|
166 |
|
---|
167 | <echo level="info"/>
|
---|
168 |
|
---|
169 |
|
---|
170 | <!-- the trunk or a branch -->
|
---|
171 | <echo level="info">Determining the branch path...</echo>
|
---|
172 | <if>
|
---|
173 | <bool>
|
---|
174 | <equals arg1="trunk" arg2="${version}"/>
|
---|
175 | </bool>
|
---|
176 | <property name="branch.path" value="trunk"/>
|
---|
177 |
|
---|
178 | <else>
|
---|
179 | <property name="branch.path" value="branches/${version}"/>
|
---|
180 | </else>
|
---|
181 | </if>
|
---|
182 | <echo level="info">Branch Path: ${branch.path}</echo>
|
---|
183 | <echo level="info"/>
|
---|
184 |
|
---|
185 | <!-- check branches exist -->
|
---|
186 | <property name="svn.greenstone3" value="${svn.root}/greenstone3/${branch.path}"/>
|
---|
187 | <property name="svn.gsdl" value="${svn.root}/gsdl/${branch.path}"/>
|
---|
188 | <property name="svn.gli" value="${svn.root}/gli/${branch.path}"/>
|
---|
189 | <property name="svn.indexers" value="${svn.root}/indexers/${branch.path}"/>
|
---|
190 | <property name="svn.documentation" value="${svn.root}/documentation/${branch.path}"/>
|
---|
191 |
|
---|
192 | <tempfile property="temp.file" destdir="${java.io.tmpdir}" prefix="delete" suffix=".tmp"/>
|
---|
193 |
|
---|
194 | <!-- greenstone3 branch -->
|
---|
195 | <echo level="info">Checking that ${svn.greenstone3} exists...</echo>
|
---|
196 | <!-- try to put the html index of the location into the temp file -->
|
---|
197 | <setloglevel level="error"/>
|
---|
198 | <try>
|
---|
199 | <get src="${svn.greenstone3}" dest="${temp.file}"/>
|
---|
200 | <catch>
|
---|
201 | <echo level="error">No, it does not exist</echo>
|
---|
202 | <property name="svn.greenstone3.unavailable" value="true"/>
|
---|
203 | </catch>
|
---|
204 | </try>
|
---|
205 | <setloglevel level="info"/>
|
---|
206 | <if>
|
---|
207 | <bool><not><istrue value="${svn.greenstone3.unavailable}"/></not></bool>
|
---|
208 | <echo level="info">Yes, it exists</echo>
|
---|
209 | </if>
|
---|
210 |
|
---|
211 | <!-- greenstone3 branch -->
|
---|
212 | <echo level="info">Checking that ${svn.gsdl} exists...</echo>
|
---|
213 | <setloglevel level="error"/>
|
---|
214 | <try>
|
---|
215 | <get src="${svn.gsdl}" dest="${temp.file}"/>
|
---|
216 | <catch>
|
---|
217 | <echo level="error">No, it does not exist</echo>
|
---|
218 | <property name="svn.gsdl.unavailable" value="true"/>
|
---|
219 | </catch>
|
---|
220 | </try>
|
---|
221 | <setloglevel level="info"/>
|
---|
222 | <if>
|
---|
223 | <bool><not><istrue value="${svn.gsdl.unavailable}"/></not></bool>
|
---|
224 | <echo level="info">Yes, it exists</echo>
|
---|
225 | </if>
|
---|
226 |
|
---|
227 |
|
---|
228 | <!-- gli branch -->
|
---|
229 | <echo level="info">Checking that ${svn.gli} exists...</echo>
|
---|
230 | <!-- try to put the html index of the location into the temp file -->
|
---|
231 | <setloglevel level="error"/>
|
---|
232 | <try>
|
---|
233 | <get src="${svn.gli}" dest="${temp.file}"/>
|
---|
234 | <catch>
|
---|
235 | <echo level="error">No, does not exist</echo>
|
---|
236 | <property name="svn.gli.unavailable" value="true"/>
|
---|
237 | </catch>
|
---|
238 | </try>
|
---|
239 | <setloglevel level="info"/>
|
---|
240 | <if>
|
---|
241 | <bool><not><istrue value="${svn.gli.unavailable}"/></not></bool>
|
---|
242 | <echo level="info">Yes, it exists</echo>
|
---|
243 | </if>
|
---|
244 |
|
---|
245 |
|
---|
246 | <!-- indexers branch -->
|
---|
247 | <echo level="info">Checking that ${svn.indexers} exists...</echo>
|
---|
248 | <!-- try to put the html index of the location into the temp file -->
|
---|
249 | <setloglevel level="error"/>
|
---|
250 | <try>
|
---|
251 | <get src="${svn.indexers}" dest="${temp.file}"/>
|
---|
252 | <catch>
|
---|
253 | <echo level="error">No, it does not exist</echo>
|
---|
254 | <property name="svn.indexers.unavailable" value="true"/>
|
---|
255 | </catch>
|
---|
256 | </try>
|
---|
257 | <setloglevel level="info"/>
|
---|
258 | <if>
|
---|
259 | <bool><not><istrue value="${svn.indexers.unavailable}"/></not></bool>
|
---|
260 | <echo level="info">Yes, it exists</echo>
|
---|
261 | </if>
|
---|
262 |
|
---|
263 | <!-- documentation branch -->
|
---|
264 | <echo level="info">Checking that ${svn.documentation} exists...</echo>
|
---|
265 | <!-- try to put the html index of the location into the temp file -->
|
---|
266 | <setloglevel level="error"/>
|
---|
267 | <try>
|
---|
268 | <get src="${svn.documentation}" dest="${temp.file}"/>
|
---|
269 | <catch>
|
---|
270 | <echo level="error">No, it does not exist</echo>
|
---|
271 | <property name="svn.documentation.unavailable" value="true"/>
|
---|
272 | </catch>
|
---|
273 | </try>
|
---|
274 | <setloglevel level="info"/>
|
---|
275 | <if>
|
---|
276 | <bool><not><istrue value="${svn.documentation.unavailable}"/></not></bool>
|
---|
277 | <echo level="info">Yes, it exists</echo>
|
---|
278 | </if>
|
---|
279 |
|
---|
280 |
|
---|
281 | <!-- clean up the temp file -->
|
---|
282 | <setloglevel level="error"/>
|
---|
283 | <delete file="${temp.file}"/>
|
---|
284 | <setloglevel level="info"/>
|
---|
285 |
|
---|
286 |
|
---|
287 | <!-- fail if some branches were missing -->
|
---|
288 | <if>
|
---|
289 | <bool>
|
---|
290 | <or>
|
---|
291 | <istrue value="${svn.greenstone3.unavailable}"/>
|
---|
292 | <istrue value="${svn.gsdl.unavailable}"/>
|
---|
293 | <istrue value="${svn.gli.unavailable}"/>
|
---|
294 | <istrue value="${svn.indexers.unavailable}"/>
|
---|
295 | <istrue value="${svn.documentation.unavailable}"/>
|
---|
296 | </or>
|
---|
297 | </bool>
|
---|
298 | <fail>Some branches do not exist, or you are unable to access them from where you are. Please review the list above and create any branches that are missing, or run this script from somewhere with access to the repository.</fail>
|
---|
299 | <else>
|
---|
300 | <echo level="info">All exist</echo>
|
---|
301 | </else>
|
---|
302 | </if>
|
---|
303 |
|
---|
304 | </target>
|
---|
305 |
|
---|
306 | <target name="help">
|
---|
307 |
|
---|
308 | <echo level="info">Usage: ant -Dversion=VERSION_NUMBER -Drelease.dir=RELEASEDIR -Dusername=USERNAME -Dpassword=PASSWORD -Dmac.release.dir=OUTPUT_DIRECTORY [-Dresume.from=TARGET_ADDRESS] [-Dresume.mode=MODE] create-release</echo>
|
---|
309 | <echo level="info"/>
|
---|
310 |
|
---|
311 | <echo level="info">This project creates releases of Greenstone3 from the subversion repository given a version number.</echo>
|
---|
312 | <echo level="info"/>
|
---|
313 |
|
---|
314 | <echo level="info">Each target in this project's target tree has been given an address, like so:</echo>
|
---|
315 | <echo level="info"/>
|
---|
316 | <echo level="info">root</echo>
|
---|
317 | <echo level="info"> |-1</echo>
|
---|
318 | <echo level="info"> | |-1.1</echo>
|
---|
319 | <echo level="info"> | |-1.2</echo>
|
---|
320 | <echo level="info"> |</echo>
|
---|
321 | <echo level="info"> |-2</echo>
|
---|
322 | <echo level="info"> | |-2.1</echo>
|
---|
323 | <echo level="info"> | |-2.2</echo>
|
---|
324 | <echo level="info"> etc.</echo>
|
---|
325 |
|
---|
326 | <echo level="info"/>
|
---|
327 |
|
---|
328 |
|
---|
329 | <echo level="info">PARAMETERS</echo>
|
---|
330 | <echo level="info">Parameters are specifiable on the command line or in build.properties</echo>
|
---|
331 | <echo level="info">Parameters which remain static throughout the release process should be stores in build.properties:</echo>
|
---|
332 | <echo level="info">version, version.minor, release.dir, mac.release.dir, windows.release.dir, username</echo>
|
---|
333 | <echo level="info">Other parameters will change each time you invoke the script, specify them on the command line:</echo>
|
---|
334 | <echo level="info">resume.from, resume.mode</echo>
|
---|
335 |
|
---|
336 |
|
---|
337 |
|
---|
338 | <echo level="info"/>
|
---|
339 |
|
---|
340 | <echo level="info">version=VERSION_NUMBER, where VERSION_NUMBER={x.xx|trunk}</echo>
|
---|
341 | <echo level="info"/>
|
---|
342 | <echo level="info">This project can either create a release from a greenstone3 branch, or from the development trunk.</echo>
|
---|
343 | <echo level="info">To create a branch release, specify the VERSION_NUMBER (e.g., 3.03), and ensure that the following</echo>
|
---|
344 | <echo level="info">branches exist in the repository:</echo>
|
---|
345 | <echo level="info"> greenstone3/branches/VERSION_NUMBER</echo>
|
---|
346 | <echo level="info"> gli/branches/VERSION_NUMBER</echo>
|
---|
347 | <echo level="info"> indexers/branches/VERSION_NUMBER</echo>
|
---|
348 | <echo level="info"> documentation/branches/VERSION_NUMBER</echo>
|
---|
349 | <echo level="info">To create a trunk release, specify 'trunk' as the version number.</echo>
|
---|
350 | <echo level="info">The project will use the trunk of greenstone3, gli, indexers and documentation for the release.</echo>
|
---|
351 | <echo level="info"/>
|
---|
352 | <echo level="info"/>
|
---|
353 |
|
---|
354 | <echo level="info">release.dir=RELEASE_DIRECTORY</echo>
|
---|
355 | <echo level="info"/>
|
---|
356 | <echo level="info">Specifies the directory in the filesystem where the release files will be kept.</echo>
|
---|
357 | <echo level="info"/>
|
---|
358 | <echo level="info"/>
|
---|
359 |
|
---|
360 | <echo level="info">resume.from=TARGET_ADDRESS, where TARGET_ADDRESS=x.y.z (e.g., 2.1.3)</echo>
|
---|
361 | <echo level="info"/>
|
---|
362 | <echo level="info">Allows you to specify a target address from which execution will resume.</echo>
|
---|
363 | <echo level="info">This is helpful for restarting the script after it has failed part-way through.</echo>
|
---|
364 | <echo level="info">By default, execution starts from the root target (create-release) and proceeds downwards.</echo>
|
---|
365 | <echo level="info">You can specify a different target to start from by setting the resume.from parameter.</echo>
|
---|
366 | <echo level="info"/>
|
---|
367 | <echo level="info"/>
|
---|
368 |
|
---|
369 | <echo level="info">resume.mode=RESUME_MODE, where RESUME_MODE={fallthrough|descend}</echo>
|
---|
370 | <echo level="info"/>
|
---|
371 | <echo level="info">fallthrough (default): In fallthrough mode, execution proceeds downwards through the target tree</echo>
|
---|
372 | <echo level="info">1 -> 1.1 -> 1.2 -> 2 -> 2.1 -> 2.2 -> 3 -> 3.1 and so on.</echo>
|
---|
373 | <echo level="info">descend: In descend mode, execution descends a single branch of the target tree.</echo>
|
---|
374 | <echo level="info">For example, if resume.from was set to '2', execution would proceed thus:</echo>
|
---|
375 | <echo level="info">2 -> 2.1 -> 2.2 (exit)</echo>
|
---|
376 | <echo level="info">This is helpful when you want to debug a particular target, or fix some conditions to allow it to finish</echo>
|
---|
377 | <echo level="info">properly, and don't want to run the whole script from the start.</echo>
|
---|
378 | <echo level="info"/>
|
---|
379 | <echo level="info"/>
|
---|
380 |
|
---|
381 | <echo level="info">release.dir, mac.release.dir, windows.release.dir</echo>
|
---|
382 | <echo level="info"/>
|
---|
383 | <echo level="info">The full path to the directories where release files will be stored on</echo>
|
---|
384 | <echo level="info">linux(your machine), mac(shuttle) and windows(kohekohe).</echo>
|
---|
385 | <echo level="info">E.g., -Drelease.dir=/research/oranfry/releases/3.03</echo>
|
---|
386 | <echo level="info">E.g., -Dmac.release.dir=/Users/oranfry/releases/3.03</echo>
|
---|
387 | <echo level="info">E.g., -Dwindows.release.dir=c:\\research\\oranfry\\releases\\3.03</echo>
|
---|
388 | <echo level="info"/>
|
---|
389 | <echo level="info"/>
|
---|
390 |
|
---|
391 | <echo level="info">username</echo>
|
---|
392 | <echo level="info"/>
|
---|
393 | <echo level="info">Your username for ssh from your machine to shuttle and kohekohe.</echo>
|
---|
394 | <echo level="info">You will be prompted for your password a number of times while the script executes.</echo>
|
---|
395 | <echo level="info"/>
|
---|
396 | <echo level="info"/>
|
---|
397 |
|
---|
398 |
|
---|
399 | </target>
|
---|
400 |
|
---|
401 |
|
---|
402 |
|
---|
403 |
|
---|
404 | <!-- ADDRESSED TARGETS -->
|
---|
405 |
|
---|
406 | <!-- root target -->
|
---|
407 | <target name="create-release" depends="init">
|
---|
408 | <echo>Creating Release '${version}'</echo>
|
---|
409 | <addressedcall target="prep"/>
|
---|
410 | <addressedcall target="compile-binaries"/>
|
---|
411 | <addressedcall target="create-distribution"/>
|
---|
412 | <addressedcall target="create-source-distribution"/>
|
---|
413 | <addressedcall target="compile-documentation"/>
|
---|
414 | <addressedcall target="create-installer-project"/>
|
---|
415 | <addressedcall target="build-installers"/>
|
---|
416 | <addressedcall target="aggregate-release-files"/>
|
---|
417 | </target>
|
---|
418 |
|
---|
419 | <!-- first level targets -->
|
---|
420 | <target name="prep">
|
---|
421 | <addressedcall target="create-dir-structure" />
|
---|
422 | </target>
|
---|
423 |
|
---|
424 | <target name="compile-binaries">
|
---|
425 | <addressedcall target="linux" />
|
---|
426 | <addressedcall target="windows" />
|
---|
427 | <addressedcall target="mac" />
|
---|
428 | </target>
|
---|
429 |
|
---|
430 | <target name="create-distribution">
|
---|
431 | <!-- create distribution -->
|
---|
432 | <addressedcall target="export-greenstone3" />
|
---|
433 | <addressedcall target="dist-set-version-number-property" />
|
---|
434 | <addressedcall target="create-distributions-1" />
|
---|
435 | <addressedcall target="create-distributions-2" />
|
---|
436 | <addressedcall target="create-distributions-3" />
|
---|
437 | <addressedcall target="copy-over-build-xml" />
|
---|
438 | <addressedcall target="insert-user-manual"/>
|
---|
439 | <addressedcall target="insert-compiled-binaries"/>
|
---|
440 | </target>
|
---|
441 |
|
---|
442 | <target name="create-source-distribution">
|
---|
443 | <!-- create distribution -->
|
---|
444 | <addressedcall target="source-export-greenstone3" />
|
---|
445 | <addressedcall target="source-set-version-number-property" />
|
---|
446 | <addressedcall target="source-create-distribution" />
|
---|
447 | <addressedcall target="source-copy-over-build-xml" />
|
---|
448 | <addressedcall target="source-insert-user-manual"/>
|
---|
449 | <addressedcall target="source-create-archive"/>
|
---|
450 | </target>
|
---|
451 |
|
---|
452 | <target name="compile-documentation">
|
---|
453 | <!-- compile documentation -->
|
---|
454 | </target>
|
---|
455 |
|
---|
456 | <target name="create-installer-project">
|
---|
457 | <if><bool><istrue value="${execute}"/></bool>
|
---|
458 |
|
---|
459 | <delete dir="${release.dir}/installer"/>
|
---|
460 | <mkdir dir="${release.dir}/installer"/>
|
---|
461 | <echo level="info">copy the installer</echo>
|
---|
462 | <exec executable="cp"><arg line="-r /home/nzdl/for-distributions/installers/greenstone3 ${release.dir}/installer/greenstone3"/></exec>
|
---|
463 |
|
---|
464 | <!-- Edit the <installer-dir>/greenstone3/Greenstone3 Digital Library Software.uip file and change any absolute paths as needed. Make sure you change all paths. -->
|
---|
465 | <copy overwrite="true" file="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip.template" tofile="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" />
|
---|
466 | <rsr file="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" pattern="@release\.dir@" replacement="${release.dir}" />
|
---|
467 | <rsr file="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" pattern="@version\.minor@" replacement="${version.minor}" />
|
---|
468 | <rsr file="/home/nzdl/installshieldX/alias.properties" pattern="(GSDL3_DISTRIBUTION_SOURCE)=.*" replacement="$1=${release.dir}/dist/greenstone3" />
|
---|
469 | <if>
|
---|
470 | <bool><equals arg1="${version}" arg2="trunk"/></bool>
|
---|
471 | <rsr file="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" pattern="@version@" replacement="trunk" />
|
---|
472 | <else>
|
---|
473 | <rsr file="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" pattern="@version@" replacement="v${version}" />
|
---|
474 | </else>
|
---|
475 | </if>
|
---|
476 |
|
---|
477 | </if>
|
---|
478 | </target>
|
---|
479 |
|
---|
480 | <target name="build-installers">
|
---|
481 | <if><bool><istrue value="${execute}"/></bool>
|
---|
482 |
|
---|
483 | <!-- linux -->
|
---|
484 | <exec dir="${release.dir}/installer/greenstone3" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
|
---|
485 | <arg value="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" />
|
---|
486 | <arg value="-build" />
|
---|
487 | <arg value="Linux Distribution" />
|
---|
488 | </exec>
|
---|
489 |
|
---|
490 | <!-- windows -->
|
---|
491 | <exec dir="${release.dir}/installer/greenstone3" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
|
---|
492 | <arg value="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" />
|
---|
493 | <arg value="-build" />
|
---|
494 | <arg value="Windows Distribution" />
|
---|
495 | </exec>
|
---|
496 |
|
---|
497 | <!-- mac -->
|
---|
498 | <exec dir="${release.dir}/installer/greenstone3" executable="/home/nzdl/installshieldX/InstallShieldUniversalCommandLineBuild">
|
---|
499 | <arg value="${release.dir}/installer/greenstone3/Greenstone3 Digital Library Software.uip" />
|
---|
500 | <arg value="-build" />
|
---|
501 | <arg value="Mac OS X Distribution" />
|
---|
502 | </exec>
|
---|
503 |
|
---|
504 | </if>
|
---|
505 | </target>
|
---|
506 |
|
---|
507 | <target name="aggregate-release-files">
|
---|
508 | <if><bool><istrue value="${execute}"/></bool>
|
---|
509 | <delete dir="${release.dir}/gs3-${version}-release" />
|
---|
510 | <mkdir dir="${release.dir}/gs3-${version}-release" />
|
---|
511 | <exec executable="cp"><arg line="${release.dir}/installer/greenstone3/linux-distribution/disk1/setupLinux.bin ${release.dir}/gs3-${version}-release/greenstone-3.${version.minor}-linux.bin"/></exec>
|
---|
512 | <exec executable="cp"><arg line="${release.dir}/installer/greenstone3/macOSx-distribution/disk1/setupMac.command ${release.dir}/gs3-${version}-release/greenstone-3.${version.minor}-macOSx.command"/></exec>
|
---|
513 | <exec executable="cp"><arg line="${release.dir}/installer/greenstone3/windows-distribution/disk1/setupwin32.exe ${release.dir}/gs3-${version}-release/greenstone-3.${version.minor}-win32.exe"/></exec>
|
---|
514 | <exec executable="cp"><arg line="${release.dir}/source-dist/greenstone-3.${version.minor}-src.tar.gz ${release.dir}/gs3-${version}-release"/></exec>
|
---|
515 | </if>
|
---|
516 | </target>
|
---|
517 |
|
---|
518 |
|
---|
519 | <!-- second level targets -->
|
---|
520 | <target name="create-dir-structure">
|
---|
521 | <if><bool><istrue value="${execute}"/></bool>
|
---|
522 | <mkdir dir="${release.dir}" />
|
---|
523 | <mkdir dir="${release.dir}/other-platforms" />
|
---|
524 | <mkdir dir="${release.dir}/dist" />
|
---|
525 | <mkdir dir="${release.dir}/source-dist" />
|
---|
526 | <mkdir dir="${release.dir}/installer" />
|
---|
527 | </if>
|
---|
528 | </target>
|
---|
529 |
|
---|
530 |
|
---|
531 | <target name="linux">
|
---|
532 | <!-- preparation -->
|
---|
533 | <addressedcall target="checkout-greenstone3" />
|
---|
534 | <addressedcall target="set-version-number-property" />
|
---|
535 | <addressedcall target="dist-prepare-unix" />
|
---|
536 | <addressedcall target="tweak-configure-scripts" />
|
---|
537 | <!-- update -->
|
---|
538 | <addressedcall target="dist-update-unix" />
|
---|
539 | <!-- configure -->
|
---|
540 | <addressedcall target="dist-configure-unix" />
|
---|
541 | <addressedcall target="tweak-makefiles" />
|
---|
542 | <!-- build -->
|
---|
543 | <addressedcall target="dist-build-unix" />
|
---|
544 | <addressedcall target="fix-wget" />
|
---|
545 | <addressedcall target="linux-strip-execs" />
|
---|
546 |
|
---|
547 | <!-- documentation -->
|
---|
548 | <addressedcall target="prepare-documentation" />
|
---|
549 | </target>
|
---|
550 |
|
---|
551 | <target name="mac">
|
---|
552 | <!-- preparation -->
|
---|
553 | <addressedcall target="mac-checkout-greenstone3" />
|
---|
554 | <addressedcall target="mac-set-gdbm-path" />
|
---|
555 |
|
---|
556 | <addressedcall target="mac-prepare-unix" />
|
---|
557 | <!-- update -->
|
---|
558 | <addressedcall target="mac-update-unix" />
|
---|
559 | <!-- configure -->
|
---|
560 | <addressedcall target="mac-configure-unix" />
|
---|
561 | <addressedcall target="mac-tweak-makefiles" />
|
---|
562 | <!-- build -->
|
---|
563 | <addressedcall target="mac-build-unix" />
|
---|
564 | <addressedcall target="mac-strip-execs" />
|
---|
565 |
|
---|
566 | <!-- grab the files -->
|
---|
567 | <addressedcall target="mac-grab-files" />
|
---|
568 | </target>
|
---|
569 |
|
---|
570 |
|
---|
571 | <target name="windows">
|
---|
572 | <if><bool><istrue value="${execute}"/></bool>
|
---|
573 |
|
---|
574 | <mkdir dir="${release.dir}/other-platforms/win-gs2build-bin-windows"/>
|
---|
575 | <mkdir dir="${release.dir}/other-platforms/win-lib-jni"/>
|
---|
576 |
|
---|
577 | <echo level="info">The windows compilation stage still has to be done manually.</echo>
|
---|
578 | <echo level="info">Please go to the kohekohe machine and follow the instructions found at:</echo>
|
---|
579 | <echo level="info">http://wesson.cs.waikato.ac.nz:7070/wiki/index.php/Creating_A_GS3_Release#Windows</echo>
|
---|
580 | <echo level="info">Do the 'Preparation' and 'Update and Build' sections</echo>
|
---|
581 | <echo level="info"/>
|
---|
582 |
|
---|
583 | <echo level="info">Then copy (scp):</echo>
|
---|
584 | <echo level="info">Windows:greenstone3/lib/jni/* to Linux:${release.dir}/other-platforms/win-lib-jni</echo>
|
---|
585 | <echo level="info">Windows:greenstone3/gs2build/bin/windows/* to Linux:${release.dir}/other-platforms/win-gs2build-bin-windows</echo>
|
---|
586 | <echo level="info"/>
|
---|
587 | <input addproperty="windows.compilation.done" validargs="done">Type 'done' when you have finished.</input>
|
---|
588 |
|
---|
589 | </if>
|
---|
590 | </target>
|
---|
591 |
|
---|
592 |
|
---|
593 |
|
---|
594 | <!-- third level targets -->
|
---|
595 | <target name="checkout-greenstone3">
|
---|
596 | <if><bool><istrue value="${execute}"/></bool>
|
---|
597 | <svn>
|
---|
598 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="${release.dir}/greenstone3"/>
|
---|
599 | </svn>
|
---|
600 | </if>
|
---|
601 | </target>
|
---|
602 |
|
---|
603 | <target name="set-version-number-property">
|
---|
604 | <if><bool><istrue value="${execute}"/></bool>
|
---|
605 | <rsr file="${release.dir}/greenstone3/resources/java/global.properties.in" pattern="@gsdl3version@" replacement="${version}" />
|
---|
606 | </if>
|
---|
607 | </target>
|
---|
608 |
|
---|
609 | <target name="dist-prepare-unix">
|
---|
610 | <if><bool><istrue value="${execute}"/></bool>
|
---|
611 | <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="prepare-unix" />
|
---|
612 | </if>
|
---|
613 | </target>
|
---|
614 | <target name="tweak-configure-scripts">
|
---|
615 | <addressedcall target="mgpp-add-static" />
|
---|
616 | <addressedcall target="mg-add-static" />
|
---|
617 | <addressedcall target="gs2buildextra-add-static" />
|
---|
618 | </target>
|
---|
619 |
|
---|
620 | <target name="dist-update-unix">
|
---|
621 | <if><bool><istrue value="${execute}"/></bool>
|
---|
622 | <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="update-unix" />
|
---|
623 | </if>
|
---|
624 | </target>
|
---|
625 |
|
---|
626 | <target name="dist-configure-unix">
|
---|
627 | <if><bool><istrue value="${execute}"/></bool>
|
---|
628 | <exec dir="${release.dir}/greenstone3/gs2build/gs2build-extra" executable="autoconf" output="${release.dir}/greenstone3/gs2build/configure">
|
---|
629 | <arg line="configure.in"/>
|
---|
630 | </exec>
|
---|
631 | <chmod file="${release.dir}/greenstone3/gs2build/configure" perm="+x"/>
|
---|
632 | <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="configure-unix" />
|
---|
633 | </if>
|
---|
634 | </target>
|
---|
635 |
|
---|
636 | <target name="tweak-makefiles">
|
---|
637 | <addressedcall target="wv-add-static" />
|
---|
638 | <addressedcall target="xlhtml-add-static" />
|
---|
639 | <addressedcall target="ppthtml-add-static" />
|
---|
640 | <addressedcall target="rtftohtml-add-static" />
|
---|
641 | <addressedcall target="gdbm-add-static" />
|
---|
642 | </target>
|
---|
643 |
|
---|
644 | <target name="dist-build-unix">
|
---|
645 | <if><bool><istrue value="${execute}"/></bool>
|
---|
646 | <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="build-unix" />
|
---|
647 | </if>
|
---|
648 | </target>
|
---|
649 |
|
---|
650 | <target name="fix-wget">
|
---|
651 | <if><bool><istrue value="${execute}"/></bool>
|
---|
652 | <!-- fix this !!! -->
|
---|
653 | <delete file="${release.dir}/greenstone3/gs2build/packages/wget/wget-1.9/src/wget"/>
|
---|
654 | </if>
|
---|
655 | </target>
|
---|
656 |
|
---|
657 | <target name="linux-strip-execs">
|
---|
658 | <if><bool><istrue value="${execute}"/></bool>
|
---|
659 | <exec dir="${release.dir}/greenstone3/gs2build/bin/linux" executable="find">
|
---|
660 | <arg line="! -name . -exec strip {} ;"/>
|
---|
661 | </exec>
|
---|
662 | </if>
|
---|
663 | </target>
|
---|
664 |
|
---|
665 | <target name="prepare-documentation">
|
---|
666 | <if><bool><istrue value="${execute}"/></bool>
|
---|
667 | <mkdir dir="${release.dir}/greenstone3/gsdl-manuals"/>
|
---|
668 | <svn>
|
---|
669 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="${release.dir}/greenstone3/gsdl-manuals/manuals"/>
|
---|
670 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="${release.dir}/greenstone3/gsdl-manuals/shared"/>
|
---|
671 | </svn>
|
---|
672 | <javac srcdir="${release.dir}/greenstone3/gsdl-manuals/shared"
|
---|
673 | destdir="${release.dir}/greenstone3/gsdl-manuals/shared"
|
---|
674 | debug="on">
|
---|
675 | <include name="*.java"/>
|
---|
676 | </javac>
|
---|
677 | <unzip src="${release.dir}/greenstone3/gsdl-manuals/shared/fop.zip" dest="${release.dir}/greenstone3/gsdl-manuals/shared"/>
|
---|
678 |
|
---|
679 | <!-- classpath -->
|
---|
680 | <path id="documentation.compile.classpath">
|
---|
681 | <fileset dir="${release.dir}/greenstone3/gsdl-manuals">
|
---|
682 | <include name="**/*.jar"/>
|
---|
683 | </fileset>
|
---|
684 | <pathelement path="${release.dir}/greenstone3/gsdl-manuals/shared"/>
|
---|
685 | <pathelement path="${release.dir}/greenstone3/gsdl-manuals/manuals"/>
|
---|
686 | </path>
|
---|
687 |
|
---|
688 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="${release.dir}/greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
689 | <arg value="${release.dir}/greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
690 | <arg value="${release.dir}/greenstone3/gli/help/en/help.xml" />
|
---|
691 | <arg value="${release.dir}/greenstone3" />
|
---|
692 | </java>
|
---|
693 |
|
---|
694 | <chmod perm="a+x" file="${release.dir}/greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
695 | <exec dir="${release.dir}/greenstone3/gsdl-manuals/manuals" executable="${release.dir}/greenstone3/gsdl-manuals/manuals/generate-pdf.sh">
|
---|
696 | <arg line="u en" />
|
---|
697 | </exec>
|
---|
698 |
|
---|
699 | </if>
|
---|
700 | </target>
|
---|
701 |
|
---|
702 | <target name="mac-checkout-greenstone3">
|
---|
703 | <if><bool><istrue value="${execute}"/></bool>
|
---|
704 | <echo level="info">create release directory, if absent</echo>
|
---|
705 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle if [ ! -e ${mac.release.dir} ]; then mkdir ${mac.release.dir}; fi" /></exec>
|
---|
706 |
|
---|
707 | <echo level="info">checkout greenstone3</echo>
|
---|
708 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}; PATH=$PATH:/usr/local/bin svn co ${svn.root}/greenstone3/${branch.path} greenstone3" /></exec>
|
---|
709 | </if>
|
---|
710 | </target>
|
---|
711 |
|
---|
712 | <target name="mac-set-gdbm-path">
|
---|
713 | <if><bool><istrue value="${execute}"/></bool>
|
---|
714 | <echo level="info">setting gdbm installed path stage 1</echo>
|
---|
715 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cat ${mac.release.dir}/greenstone3/build.properties | sed 's@^gdbm.installed.path=/Users/kjdon/[email protected]=@g' > ${mac.release.dir}/greenstone3/build.properties.tmp" /></exec>
|
---|
716 |
|
---|
717 | <echo level="info">setting gdbm installed path stage 2</echo>
|
---|
718 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cat ${mac.release.dir}/greenstone3/build.properties.tmp | sed 's@^[email protected]=/Users/kjdon/gdbm-1.8.3@g' > ${mac.release.dir}/greenstone3/build.properties" /></exec>
|
---|
719 | </if>
|
---|
720 | </target>
|
---|
721 |
|
---|
722 | <target name="mac-prepare-unix">
|
---|
723 | <if><bool><istrue value="${execute}"/></bool>
|
---|
724 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/greenstone3; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home ant -f dist-resources/dist-build.xml -Dapp.version=${version} prepare-unix" /></exec>
|
---|
725 | </if>
|
---|
726 | </target>
|
---|
727 |
|
---|
728 | <target name="mac-update-unix">
|
---|
729 | <if><bool><istrue value="${execute}"/></bool>
|
---|
730 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/greenstone3; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home ant -f dist-resources/dist-build.xml -Dapp.version=${version} update-unix" /></exec>
|
---|
731 | </if>
|
---|
732 | </target>
|
---|
733 |
|
---|
734 | <target name="mac-configure-unix">
|
---|
735 | <if><bool><istrue value="${execute}"/></bool>
|
---|
736 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/greenstone3; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home ant -f dist-resources/dist-build.xml -Dapp.version=${version} configure-unix" /></exec>
|
---|
737 | </if>
|
---|
738 | </target>
|
---|
739 |
|
---|
740 | <target name="mac-tweak-makefiles">
|
---|
741 | <if><bool><istrue value="${execute}"/></bool>
|
---|
742 | <echo level="info">tweak ${mac.release.dir}/greenstone3/gs2build/src/db2txt/Makefile</echo>
|
---|
743 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle /Users/oranfry/bin/fvsr.sh ${mac.release.dir}/greenstone3/gs2build/src/db2txt/Makefile LIBS '-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm' '/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'" /></exec>
|
---|
744 |
|
---|
745 | <echo level="info">tweak ${mac.release.dir}/greenstone3/gs2build/src/txt2db/Makefile</echo>
|
---|
746 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle /Users/oranfry/bin/fvsr.sh ${mac.release.dir}/greenstone3/gs2build/src/txt2db/Makefile LIBS '-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm' '/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'" /></exec>
|
---|
747 |
|
---|
748 | <echo level="info">tweak ${mac.release.dir}/greenstone3/src/packages/javagdbm/jni/Makefile</echo>
|
---|
749 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle /Users/oranfry/bin/fvsr.sh ${mac.release.dir}/greenstone3/src/packages/javagdbm/jni/Makefile GDBM_LIBS '-L/Users/kjdon/gdbm-1.8.3/lib -lgdbm'ã'/Users/kjdon/gdbm-1.8.3/lib/libgdbm.a'" /></exec>
|
---|
750 | </if>
|
---|
751 | </target>
|
---|
752 |
|
---|
753 | <target name="mac-build-unix">
|
---|
754 | <if><bool><istrue value="${execute}"/></bool>
|
---|
755 | <echo level="info">mac: ant build-unix</echo>
|
---|
756 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/greenstone3; PATH=$PATH:/usr/local/bin JAVA_HOME=/Library/Java/Home ant -f dist-resources/dist-build.xml -Dapp.version=${version} build-unix" /></exec>
|
---|
757 | </if>
|
---|
758 | </target>
|
---|
759 |
|
---|
760 | <target name="mac-strip-execs">
|
---|
761 | <if><bool><istrue value="${execute}"/></bool>
|
---|
762 | <exec executable="/usr/bin/ssh"><arg line="${username}:${password}@shuttle cd ${mac.release.dir}/greenstone3; strip gs2build/bin/darwin/*" /></exec>
|
---|
763 | </if>
|
---|
764 | </target>
|
---|
765 |
|
---|
766 | <target name="mac-grab-files">
|
---|
767 | <if><bool><istrue value="${execute}"/></bool>
|
---|
768 | <delete dir="${release.dir}/other-platforms/mac-lib-jni"/>
|
---|
769 | <exec executable="/usr/bin/scp"><arg line="-r ${username}@shuttle:${mac.release.dir}/greenstone3/lib/jni ${release.dir}/other-platforms/mac-lib-jni" /></exec>
|
---|
770 |
|
---|
771 | <delete dir="${release.dir}/other-platforms/mac-gs2build-bin-darwin"/>
|
---|
772 | <exec executable="/usr/bin/scp"><arg line="-r ${username}@shuttle:${mac.release.dir}/greenstone3/gs2build/bin/darwin ${release.dir}/other-platforms/mac-gs2build-bin-darwin" /></exec>
|
---|
773 | </if>
|
---|
774 | </target>
|
---|
775 |
|
---|
776 | <target name="export-greenstone3">
|
---|
777 | <if><bool><istrue value="${execute}"/></bool>
|
---|
778 | <svn>
|
---|
779 | <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="${release.dir}/dist/greenstone3"/>
|
---|
780 | </svn>
|
---|
781 | </if>
|
---|
782 | </target>
|
---|
783 |
|
---|
784 | <target name="dist-set-version-number-property">
|
---|
785 | <if><bool><istrue value="${execute}"/></bool>
|
---|
786 | <rsr file="${release.dir}/dist/greenstone3/resources/java/global.properties.in" pattern="@gsdl3version@" replacement="${version}" />
|
---|
787 | </if>
|
---|
788 | </target>
|
---|
789 |
|
---|
790 | <target name="create-distributions-1">
|
---|
791 | <if><bool><istrue value="${execute}"/></bool>
|
---|
792 | <ant antfile="${release.dir}/dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-1" />
|
---|
793 | </if>
|
---|
794 | </target>
|
---|
795 |
|
---|
796 | <target name="create-distributions-2">
|
---|
797 | <if><bool><istrue value="${execute}"/></bool>
|
---|
798 | <ant antfile="${release.dir}/dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-2" />
|
---|
799 | </if>
|
---|
800 | </target>
|
---|
801 |
|
---|
802 | <target name="create-distributions-3">
|
---|
803 | <if><bool><istrue value="${execute}"/></bool>
|
---|
804 | <ant antfile="${release.dir}/dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-3" />
|
---|
805 | </if>
|
---|
806 | </target>
|
---|
807 |
|
---|
808 | <target name="copy-over-build-xml">
|
---|
809 | <if><bool><istrue value="${execute}"/></bool>
|
---|
810 | <move file="${release.dir}/dist/greenstone3/dist-build.xml" tofile="${release.dir}/dist/greenstone3/build.xml"/>
|
---|
811 | </if>
|
---|
812 | </target>
|
---|
813 |
|
---|
814 | <target name="insert-user-manual">
|
---|
815 | <if><bool><istrue value="${execute}"/></bool>
|
---|
816 | <copy file="${release.dir}/greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="${release.dir}/dist/greenstone3/docs/manual/gs2_user_en.pdf"/>
|
---|
817 | </if>
|
---|
818 | </target>
|
---|
819 |
|
---|
820 | <target name="insert-compiled-binaries">
|
---|
821 | <if><bool><istrue value="${execute}"/></bool>
|
---|
822 |
|
---|
823 | <!-- windows -->
|
---|
824 | <mkdir dir="${release.dir}/dist/greenstone3/Windows/lib/jni"/>
|
---|
825 | <exec executable="cp"><arg line="${release.dir}/other-platforms/win-lib-jni/* ${release.dir}/dist/greenstone3/Windows/lib/jni"/></exec>
|
---|
826 |
|
---|
827 | <mkdir dir="${release.dir}/dist/greenstone3/gs2build/Windows/bin/windows"/>
|
---|
828 | <exec executable="cp"><arg line="${release.dir}/other-platforms/win-gs2build-bin-windows/* ${release.dir}/dist/greenstone3/gs2build/Windows/bin/windows"/></exec>
|
---|
829 |
|
---|
830 | <!-- mac -->
|
---|
831 | <mkdir dir="${release.dir}/dist/greenstone3/Darwin/lib/jni"/>
|
---|
832 | <exec executable="cp"><arg line="${release.dir}/other-platforms/mac-lib-jni/* ${release.dir}/dist/greenstone3/Darwin/lib/jni"/></exec>
|
---|
833 |
|
---|
834 | <mkdir dir="${release.dir}/dist/greenstone3/gs2build/Unix/bin/darwin"/>
|
---|
835 | <exec executable="cp"><arg line="${release.dir}/other-platforms/mac-gs2build-bin-darwin/* ${release.dir}/dist/greenstone3/gs2build/Unix/bin/darwin"/></exec>
|
---|
836 |
|
---|
837 | <!-- linux -->
|
---|
838 | <mkdir dir="${release.dir}/dist/greenstone3/Linux/lib/jni"/>
|
---|
839 | <exec executable="cp"><arg line="${release.dir}/greenstone3/lib/jni/* ${release.dir}/dist/greenstone3/Linux/lib/jni"/></exec>
|
---|
840 |
|
---|
841 | <mkdir dir="${release.dir}/dist/greenstone3/gs2build/Unix/bin/linux"/>
|
---|
842 | <exec executable="cp"><arg line="${release.dir}/greenstone3/gs2build/bin/linux/* ${release.dir}/dist/greenstone3/gs2build/Unix/bin/linux"/></exec>
|
---|
843 |
|
---|
844 | <mkdir dir="${release.dir}/dist/greenstone3/gs2build/bin/java"/>
|
---|
845 | <exec executable="cp"><arg line="${release.dir}/greenstone3/gs2build/bin/java/* ${release.dir}/dist/greenstone3/gs2build/bin/java"/></exec>
|
---|
846 |
|
---|
847 | </if>
|
---|
848 | </target>
|
---|
849 |
|
---|
850 |
|
---|
851 | <target name="source-export-greenstone3">
|
---|
852 | <if><bool><istrue value="${execute}"/></bool>
|
---|
853 | <svn>
|
---|
854 | <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="${release.dir}/source-dist/greenstone3"/>
|
---|
855 | </svn>
|
---|
856 | </if>
|
---|
857 | </target>
|
---|
858 |
|
---|
859 | <target name="source-set-version-number-property">
|
---|
860 | <if><bool><istrue value="${execute}"/></bool>
|
---|
861 | <rsr file="${release.dir}/source-dist/greenstone3/resources/java/global.properties.in" pattern="@gsdl3version@" replacement="${version}" />
|
---|
862 | </if>
|
---|
863 | </target>
|
---|
864 |
|
---|
865 | <target name="source-create-distribution">
|
---|
866 | <if><bool><istrue value="${execute}"/></bool>
|
---|
867 | <ant antfile="${release.dir}/source-dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/source-dist/greenstone3" target="create-source-distribution" />
|
---|
868 | </if>
|
---|
869 | </target>
|
---|
870 |
|
---|
871 | <target name="source-copy-over-build-xml">
|
---|
872 | <if><bool><istrue value="${execute}"/></bool>
|
---|
873 | <move file="${release.dir}/source-dist/greenstone3/dist-build.xml" tofile="${release.dir}/source-dist/greenstone3/build.xml"/>
|
---|
874 | </if>
|
---|
875 | </target>
|
---|
876 |
|
---|
877 | <target name="source-insert-user-manual">
|
---|
878 | <if><bool><istrue value="${execute}"/></bool>
|
---|
879 | <copy file="${release.dir}/greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="${release.dir}/source-dist/greenstone3/docs/manual/gs2_user_en.pdf"/>
|
---|
880 | </if>
|
---|
881 | </target>
|
---|
882 |
|
---|
883 | <target name="source-create-archive">
|
---|
884 | <if><bool><istrue value="${execute}"/></bool>
|
---|
885 | <tar compression="gzip" destfile="${release.dir}/source-dist/greenstone-3.${version.minor}-src.tar.gz" basedir="${release.dir}/source-dist/greenstone3"/>
|
---|
886 | </if>
|
---|
887 | </target>
|
---|
888 |
|
---|
889 | <!-- fourth level targets -->
|
---|
890 | <target name="mgpp-add-static">
|
---|
891 | <if><bool><istrue value="${execute}"/></bool>
|
---|
892 | <rsr file="${release.dir}/greenstone3/gs2build/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
893 | <exec dir="${release.dir}/greenstone3/gs2build/indexers/mgpp" executable="autoconf" output="${release.dir}/greenstone3/gs2build/indexers/mgpp/configure">
|
---|
894 | <arg line="configure.in"/>
|
---|
895 | </exec>
|
---|
896 | </if>
|
---|
897 | </target>
|
---|
898 | <target name="mg-add-static">
|
---|
899 | <if><bool><istrue value="${execute}"/></bool>
|
---|
900 | <rsr file="${release.dir}/greenstone3/gs2build/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
901 | <exec dir="${release.dir}/greenstone3/gs2build/indexers/mg" executable="autoconf" output="${release.dir}/greenstone3/gs2build/indexers/mg/configure">
|
---|
902 | <arg line="configure.in"/>
|
---|
903 | </exec>
|
---|
904 | </if>
|
---|
905 | </target>
|
---|
906 | <target name="gs2buildextra-add-static">
|
---|
907 | <if><bool><istrue value="${execute}"/></bool>
|
---|
908 | <rsr file="${release.dir}/greenstone3/gs2build/gs2build-extra/packages.configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" />
|
---|
909 | <rsr file="${release.dir}/greenstone3/gs2build/gs2build-extra/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
910 | </if>
|
---|
911 | </target>
|
---|
912 |
|
---|
913 | <target name="wv-add-static">
|
---|
914 | <if><bool><istrue value="${execute}"/></bool>
|
---|
915 | <rsr file="${release.dir}/greenstone3/gs2build/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
916 | </if>
|
---|
917 | </target>
|
---|
918 | <target name="xlhtml-add-static">
|
---|
919 | <if><bool><istrue value="${execute}"/></bool>
|
---|
920 | <rsr file="${release.dir}/greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
921 | </if>
|
---|
922 | </target>
|
---|
923 | <target name="ppthtml-add-static">
|
---|
924 | <if><bool><istrue value="${execute}"/></bool>
|
---|
925 | <rsr file="${release.dir}/greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
926 | </if>
|
---|
927 | </target>
|
---|
928 | <target name="rtftohtml-add-static">
|
---|
929 | <if><bool><istrue value="${execute}"/></bool>
|
---|
930 | <rsr file="${release.dir}/greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml.{2}EXEEXT.{1}" replacement="-o rtftohtml\$(EXEEXT) -static" />
|
---|
931 | </if>
|
---|
932 | </target>
|
---|
933 | <target name="gdbm-add-static">
|
---|
934 | <if><bool><istrue value="${execute}"/></bool>
|
---|
935 | <rsr file="${release.dir}/greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
|
---|
936 | </if>
|
---|
937 | </target>
|
---|
938 |
|
---|
939 | <target name="create-branches">
|
---|
940 | <if>
|
---|
941 | <bool>
|
---|
942 | <and>
|
---|
943 | <isset property="branch.path" />
|
---|
944 | <not><equals arg1="${branch.path}" arg2=""/></not>
|
---|
945 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
946 | </and>
|
---|
947 | </bool>
|
---|
948 | <svn>
|
---|
949 | <copy srcUrl="${svn.root}/greenstone3/trunk" destUrl="${svn.root}/greenstone3/${branch.path}" message="creating a branch for the ${version} release" />
|
---|
950 | <copy srcUrl="${svn.root}/gli/trunk" destUrl="${svn.root}/gli/${branch.path}" message="creating a branch for the ${version} release" />
|
---|
951 | <copy srcUrl="${svn.root}/documentation/trunk" destUrl="${svn.root}/documentation/${branch.path}" message="creating a branch for the ${version} release" />
|
---|
952 | <copy srcUrl="${svn.root}/indexers/trunk" destUrl="${svn.root}/indexers/${branch.path}" message="creating a branch for the ${version} release" />
|
---|
953 | <copy srcUrl="${svn.root}/gsdl/trunk" destUrl="${svn.root}/gsdl/${branch.path}" message="creating a branch for the ${version} release" />
|
---|
954 | </svn>
|
---|
955 | <else><fail>please set the branch.path, e.g., -Dbranch.path=branches/3.03</fail></else>
|
---|
956 | </if>
|
---|
957 | </target>
|
---|
958 |
|
---|
959 | </project>
|
---|