source: release-kits/lirk3/resources/old-build.xml@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 24.3 KB
RevLine 
[14982]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="lirk3-init">
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
35
36 <!-- target relations
37 <typedef name="isafter" classname="IsAfter" classpathref="project.classpath"/>
38 <typedef name="isdescendantof" classname="IsDescendantOf" classpathref="project.classpath"/>
39 <typedef name="isbetweenyandroot" classname="IsBetweenYAndRoot" classpathref="project.classpath"/> -->
40
41
42 <!-- load in static properties from build.properties -->
43 <property file="${release.dir}/build.properties" />
44
45 <!-- stuff to do before all tasks -->
46 <target name="init">
47
48 <echo level="info">CHECKING PRE-CONDITIONS</echo>
49 <echo level="info"/>
50
51 <!-- version number -->
52 <echo level="info">Checking if version number is set...</echo>
53 <if>
54 <bool>
55 <or>
56 <not><isset property="version"/></not>
57 <not><isset property="version.minor"/></not>
58 </or>
59 </bool>
60 <echo level="error">No, not set</echo>
61 <echo level="error">Please specify a version number in your build.properties file</echo>
62 <fail>Version number not set</fail>
63 </if>
64 <echo level="info">Version number: ${version}</echo>
65 <property name="app.version" value="${version}"/>
66 <echo level="info"/>
67
68 <!-- check resume from -->
69 <echo level="info">Checking if we are resuming from a given target...</echo>
70 <if>
71 <bool><not><isset property="resume.from"/></not></bool>
72 <echo level="info">No, start from the beginning</echo>
73 <property name="resume.from" value="1"/>
74 <else>
75 <echo level="info">Yes, resuming from ${resume.from}</echo>
76 </else>
77 </if>
78 <echo level="info"/>
79
80 <!-- check resume mode-->
81 <echo level="info">Determining resume mode...</echo>
82 <if>
83 <bool>
84 <not><isset property="resume.mode"/></not>
85 </bool>
86 <echo level="info">Mode not set, defaulting to 'fallthrough'</echo>
87 <property name="resume.mode" value="fallthrough"/>
88 <else>
89 <echo level="info">Mode set to ${resume.mode}</echo>
90 <if>
91 <bool>
92 <and>
93 <not><equals arg1="${resume.mode}" arg2="descend"/></not>
94 <not><equals arg1="${resume.mode}" arg2="fallthrough"/></not>
95 </and>
96 </bool>
97 <echo level="error">You have not specified a valid resume mode.</echo>
98 <echo level="error">Valid modes are 'fallthrough' and 'descend'.</echo>
99 <fail>You have not specified a valid resume mode.</fail>
100 </if>
101 </else>
102 </if>
103 <echo level="info"/>
104
105 <!-- execute target code or just traverse tree -->
106 <echo level="info">Determining execute mode...</echo>
107 <if>
108 <bool>
109 <not><isset property="execute"/></not>
110 </bool>
111 <echo level="info">Execute not set, defaulting to 'true'</echo>
112 <property name="execute" value="true"/>
113 <else>
114 <echo level="info">Execute set to ${execute}</echo>
115 <if>
116 <bool>
117 <and>
118 <not><equals arg1="${execute}" arg2="true"/></not>
119 <not><equals arg1="${execute}" arg2="false"/></not>
120 </and>
121 </bool>
122 <echo level="error">You have not specified a valid value for execute.</echo>
123 <echo level="error">Valid values are 'true' and 'false'.</echo>
124 <fail>You have not specified a valid value for execute.</fail>
125 </if>
126 </else>
127 </if>
128
129 <echo level="info"/>
130
131
132 <!-- check branch.path -->
133 <echo level="info">Determining the branch path...</echo>
134 <if>
135 <bool><equals arg1="trunk" arg2="${version}"/></bool>
136 <property name="branch.path" value="trunk"/>
137 </if>
138
139 <if>
140 <bool><not><isset property="branch.path"/></not></bool>
141 <fail>You have not specified a branch path where code will come from in the repository</fail>
142 </if>
143
144 <echo level="info">Branch Path: ${branch.path}</echo>
145 <echo level="info"/>
146
147 <!-- check branches exist -->
148 <property name="svn.greenstone3" value="${svn.root}/greenstone3/${branch.path}"/>
149 <property name="svn.gsdl" value="${svn.root}/gsdl/${branch.path}"/>
150 <property name="svn.gli" value="${svn.root}/gli/${branch.path}"/>
151 <property name="svn.indexers" value="${svn.root}/indexers/${branch.path}"/>
152 <property name="svn.documentation" value="${svn.root}/documentation/${branch.path}"/>
153
154 <tempfile property="temp.file" destdir="${java.io.tmpdir}" prefix="delete" suffix=".tmp"/>
155
156 <!-- greenstone3 branch -->
157 <echo level="info">Checking that ${svn.greenstone3} exists...</echo>
158
159 <!-- try to put the html index of the location into the temp file -->
160 <setloglevel level="error"/>
161 <try>
162 <get src="${svn.greenstone3}" dest="${temp.file}"/>
163 <catch>
164 <echo level="error">No, it does not exist</echo>
165 <property name="svn.greenstone3.unavailable" value="true"/>
166 </catch>
167 </try>
168 <setloglevel level="info"/>
169 <if>
170 <bool><not><istrue value="${svn.greenstone3.unavailable}"/></not></bool>
171 <echo level="info">Yes, it exists</echo>
172 </if>
173
174 <!-- greenstone3 branch -->
175 <echo level="info">Checking that ${svn.gsdl} exists...</echo>
176 <setloglevel level="error"/>
177 <try>
178 <get src="${svn.gsdl}" dest="${temp.file}"/>
179 <catch>
180 <echo level="error">No, it does not exist</echo>
181 <property name="svn.gsdl.unavailable" value="true"/>
182 </catch>
183 </try>
184 <setloglevel level="info"/>
185 <if>
186 <bool><not><istrue value="${svn.gsdl.unavailable}"/></not></bool>
187 <echo level="info">Yes, it exists</echo>
188 </if>
189
190
191 <!-- gli branch -->
192 <echo level="info">Checking that ${svn.gli} exists...</echo>
193 <!-- try to put the html index of the location into the temp file -->
194 <setloglevel level="error"/>
195 <try>
196 <get src="${svn.gli}" dest="${temp.file}"/>
197 <catch>
198 <echo level="error">No, does not exist</echo>
199 <property name="svn.gli.unavailable" value="true"/>
200 </catch>
201 </try>
202 <setloglevel level="info"/>
203 <if>
204 <bool><not><istrue value="${svn.gli.unavailable}"/></not></bool>
205 <echo level="info">Yes, it exists</echo>
206 </if>
207
208
209 <!-- indexers branch -->
210 <echo level="info">Checking that ${svn.indexers} exists...</echo>
211 <!-- try to put the html index of the location into the temp file -->
212 <setloglevel level="error"/>
213 <try>
214 <get src="${svn.indexers}" dest="${temp.file}"/>
215 <catch>
216 <echo level="error">No, it does not exist</echo>
217 <property name="svn.indexers.unavailable" value="true"/>
218 </catch>
219 </try>
220 <setloglevel level="info"/>
221 <if>
222 <bool><not><istrue value="${svn.indexers.unavailable}"/></not></bool>
223 <echo level="info">Yes, it exists</echo>
224 </if>
225
226 <!-- documentation branch -->
227 <echo level="info">Checking that ${svn.documentation} exists...</echo>
228 <!-- try to put the html index of the location into the temp file -->
229 <setloglevel level="error"/>
230 <try>
231 <get src="${svn.documentation}" dest="${temp.file}"/>
232 <catch>
233 <echo level="error">No, it does not exist</echo>
234 <property name="svn.documentation.unavailable" value="true"/>
235 </catch>
236 </try>
237 <setloglevel level="info"/>
238 <if>
239 <bool><not><istrue value="${svn.documentation.unavailable}"/></not></bool>
240 <echo level="info">Yes, it exists</echo>
241 </if>
242
243
244 <!-- clean up the temp file -->
245 <setloglevel level="error"/>
246 <delete file="${temp.file}"/>
247 <setloglevel level="info"/>
248
249
250 <!-- fail if some branches were missing -->
251 <if>
252 <bool>
253 <or>
254 <istrue value="${svn.greenstone3.unavailable}"/>
255 <istrue value="${svn.gsdl.unavailable}"/>
256 <istrue value="${svn.gli.unavailable}"/>
257 <istrue value="${svn.indexers.unavailable}"/>
258 <istrue value="${svn.documentation.unavailable}"/>
259 </or>
260 </bool>
261 <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>
262 <else>
263 <echo level="info">All exist</echo>
264 </else>
265 </if>
266
267 </target>
268
269 <target name="help">
270
271 <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>
272 <echo level="info"/>
273
274 <echo level="info">This project creates releases of Greenstone3 from the subversion repository given a version number.</echo>
275 <echo level="info"/>
276
277 <echo level="info">Each target in this project's target tree has been given an address, like so:</echo>
278 <echo level="info"/>
279 <echo level="info">root</echo>
280 <echo level="info"> |-1</echo>
281 <echo level="info"> | |-1.1</echo>
282 <echo level="info"> | |-1.2</echo>
283 <echo level="info"> |</echo>
284 <echo level="info"> |-2</echo>
285 <echo level="info"> | |-2.1</echo>
286 <echo level="info"> | |-2.2</echo>
287 <echo level="info"> etc.</echo>
288
289 <echo level="info"/>
290
291
292 <echo level="info">PARAMETERS</echo>
293 <echo level="info">Parameters are specifiable on the command line or in build.properties</echo>
294 <echo level="info">Parameters which remain static throughout the release process should be stores in build.properties:</echo>
295 <echo level="info">version, version.minor, release.dir, mac.release.dir, windows.release.dir, username</echo>
296 <echo level="info">Other parameters will change each time you invoke the script, specify them on the command line:</echo>
297 <echo level="info">resume.from, resume.mode</echo>
298
299
300
301 <echo level="info"/>
302
303 <echo level="info">version=VERSION_NUMBER, where VERSION_NUMBER={x.xx|trunk}</echo>
304 <echo level="info"/>
305 <echo level="info">This project can either create a release from a greenstone3 branch, or from the development trunk.</echo>
306 <echo level="info">To create a branch release, specify the VERSION_NUMBER (e.g., 3.03), and ensure that the following</echo>
307 <echo level="info">branches exist in the repository:</echo>
308 <echo level="info"> greenstone3/branches/VERSION_NUMBER</echo>
309 <echo level="info"> gli/branches/VERSION_NUMBER</echo>
310 <echo level="info"> indexers/branches/VERSION_NUMBER</echo>
311 <echo level="info"> documentation/branches/VERSION_NUMBER</echo>
312 <echo level="info">To create a trunk release, specify 'trunk' as the version number.</echo>
313 <echo level="info">The project will use the trunk of greenstone3, gli, indexers and documentation for the release.</echo>
314 <echo level="info"/>
315 <echo level="info"/>
316
317 <echo level="info">release.dir=RELEASE_DIRECTORY</echo>
318 <echo level="info"/>
319 <echo level="info">Specifies the directory in the filesystem where the release files will be kept.</echo>
320 <echo level="info"/>
321 <echo level="info"/>
322
323 <echo level="info">resume.from=TARGET_ADDRESS, where TARGET_ADDRESS=x.y.z (e.g., 2.1.3)</echo>
324 <echo level="info"/>
325 <echo level="info">Allows you to specify a target address from which execution will resume.</echo>
326 <echo level="info">This is helpful for restarting the script after it has failed part-way through.</echo>
327 <echo level="info">By default, execution starts from the root target (create-release) and proceeds downwards.</echo>
328 <echo level="info">You can specify a different target to start from by setting the resume.from parameter.</echo>
329 <echo level="info"/>
330 <echo level="info"/>
331
332 <echo level="info">resume.mode=RESUME_MODE, where RESUME_MODE={fallthrough|descend}</echo>
333 <echo level="info"/>
334 <echo level="info">fallthrough (default): In fallthrough mode, execution proceeds downwards through the target tree</echo>
335 <echo level="info">1 -> 1.1 -> 1.2 -> 2 -> 2.1 -> 2.2 -> 3 -> 3.1 and so on.</echo>
336 <echo level="info">descend: In descend mode, execution descends a single branch of the target tree.</echo>
337 <echo level="info">For example, if resume.from was set to '2', execution would proceed thus:</echo>
338 <echo level="info">2 -> 2.1 -> 2.2 (exit)</echo>
339 <echo level="info">This is helpful when you want to debug a particular target, or fix some conditions to allow it to finish</echo>
340 <echo level="info">properly, and don't want to run the whole script from the start.</echo>
341 <echo level="info"/>
342 <echo level="info"/>
343
344 <echo level="info">release.dir, mac.release.dir, windows.release.dir</echo>
345 <echo level="info"/>
346 <echo level="info">The full path to the directories where release files will be stored on</echo>
347 <echo level="info">linux(your machine), mac(shuttle) and windows(kohekohe).</echo>
348 <echo level="info">E.g., -Drelease.dir=/research/oranfry/releases/3.03</echo>
349 <echo level="info">E.g., -Dmac.release.dir=/Users/oranfry/releases/3.03</echo>
350 <echo level="info">E.g., -Dwindows.release.dir=c:\\research\\oranfry\\releases\\3.03</echo>
351 <echo level="info"/>
352 <echo level="info"/>
353
354 <echo level="info">username</echo>
355 <echo level="info"/>
356 <echo level="info">Your username for ssh from your machine to shuttle and kohekohe.</echo>
357 <echo level="info">You will be prompted for your password a number of times while the script executes.</echo>
358 <echo level="info"/>
359 <echo level="info"/>
360
361
362 </target>
363
364
365
366
367 <!-- ADDRESSED TARGETS -->
368
369
370 <!--
371
372 top level targets
373
374 -->
375
376 <target name="download" depends="init">
377 <if><bool><istrue value="${execute}"/></bool>
378
379 <svn>
380 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="${release.dir}/greenstone3"/>
381 </svn>
382
383 </if>
384 </target>
385
386
387 <target name="compile" depends="init">
388
389 <!-- preparation -->
390 <addressedcall target="set-version-number-property" />
391 <addressedcall target="dist-prepare-unix" />
392 <addressedcall target="tweak-configure-scripts" />
393
394 <!-- update -->
395 <addressedcall target="dist-update-unix" />
396
397 <!-- configure -->
398 <addressedcall target="dist-configure-unix" />
399 <addressedcall target="tweak-makefiles" />
400
401 <!-- build -->
402 <addressedcall target="dist-build-unix" />
403 <addressedcall target="fix-wget" />
404 <addressedcall target="linux-strip-execs" />
405
406 <!-- documentation -->
407 <addressedcall target="prepare-documentation" />
408
409 </target>
410
411 <target name="create-distribution" depends="init">
412 <!-- create distribution -->
413 <addressedcall target="export-greenstone3" />
414 <addressedcall target="dist-set-version-number-property" />
415 <!--<addressedcall target="create-distributions-1" />
416 <addressedcall target="create-distributions-2" />
417 <addressedcall target="create-distributions-3" />
418 <addressedcall target="copy-over-build-xml" />-->
419 <addressedcall target="insert-user-manual"/>
420 <!--<addressedcall target="insert-compiled-binaries"/>-->
421 </target>
422
423
424
425
426 <!--
427
428 second level targets
429
430 -->
431
432 <target name="set-version-number-property">
433 <if><bool><istrue value="${execute}"/></bool>
434 <rsr file="${release.dir}/greenstone3/resources/java/global.properties.in" pattern="@gsdl3version@" replacement="${version}" />
435 </if>
436 </target>
437
438 <target name="dist-prepare-unix">
439 <if><bool><istrue value="${execute}"/></bool>
440 <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="prepare-unix" />
441 </if>
442 </target>
443 <target name="tweak-configure-scripts">
444 <addressedcall target="mgpp-add-static" />
445 <addressedcall target="mg-add-static" />
446 <addressedcall target="gs2buildextra-add-static" />
447 </target>
448
449 <target name="dist-update-unix">
450 <if><bool><istrue value="${execute}"/></bool>
451 <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="update-unix" />
452 </if>
453 </target>
454
455 <target name="dist-configure-unix">
456 <if><bool><istrue value="${execute}"/></bool>
457 <exec dir="${release.dir}/greenstone3/gs2build/gs2build-extra" executable="autoconf" output="${release.dir}/greenstone3/gs2build/configure">
458 <arg line="configure.in"/>
459 </exec>
460 <chmod file="${release.dir}/greenstone3/gs2build/configure" perm="+x"/>
461 <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="configure-unix" />
462 </if>
463 </target>
464
465 <target name="tweak-makefiles">
466 <addressedcall target="wv-add-static" />
467 <addressedcall target="xlhtml-add-static" />
468 <addressedcall target="ppthtml-add-static" />
469 <addressedcall target="rtftohtml-add-static" />
470 <addressedcall target="gdbm-add-static" />
471 </target>
472
473 <target name="dist-build-unix">
474 <if><bool><istrue value="${execute}"/></bool>
475 <ant antfile="${release.dir}/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/greenstone3" target="build-unix" />
476 </if>
477 </target>
478
479 <target name="fix-wget">
480 <if><bool><istrue value="${execute}"/></bool>
481 <!-- fix this !!! -->
482 <delete file="${release.dir}/greenstone3/gs2build/packages/wget/wget-1.9/src/wget"/>
483 </if>
484 </target>
485
486 <target name="linux-strip-execs">
487 <if><bool><istrue value="${execute}"/></bool>
488 <exec dir="${release.dir}/greenstone3/gs2build/bin/linux" executable="find">
489 <arg line="! -name . -exec strip {} &#59;"/>
490 </exec>
491 </if>
492 </target>
493
494 <target name="prepare-documentation">
495 <if><bool><istrue value="${execute}"/></bool>
496 <mkdir dir="${release.dir}/greenstone3/gsdl-manuals"/>
497 <svn>
498 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="${release.dir}/greenstone3/gsdl-manuals/manuals"/>
499 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="${release.dir}/greenstone3/gsdl-manuals/shared"/>
500 </svn>
501 <javac srcdir="${release.dir}/greenstone3/gsdl-manuals/shared"
502 destdir="${release.dir}/greenstone3/gsdl-manuals/shared"
503 debug="on">
504 <include name="*.java"/>
505 </javac>
506 <unzip src="${release.dir}/greenstone3/gsdl-manuals/shared/fop.zip" dest="${release.dir}/greenstone3/gsdl-manuals/shared"/>
507
508 <!-- classpath -->
509 <path id="documentation.compile.classpath">
510 <fileset dir="${release.dir}/greenstone3/gsdl-manuals">
511 <include name="**/*.jar"/>
512 </fileset>
513 <pathelement path="${release.dir}/greenstone3/gsdl-manuals/shared"/>
514 <pathelement path="${release.dir}/greenstone3/gsdl-manuals/manuals"/>
515 </path>
516
517 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="${release.dir}/greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
518 <arg value="${release.dir}/greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
519 <arg value="${release.dir}/greenstone3/gli/help/en/help.xml" />
520 <arg value="${release.dir}/greenstone3" />
521 </java>
522
523 <chmod perm="a+x" file="${release.dir}/greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
524 <exec dir="${release.dir}/greenstone3/gsdl-manuals/manuals" executable="${release.dir}/greenstone3/gsdl-manuals/manuals/generate-pdf.sh">
525 <arg line="u en" />
526 </exec>
527 </if>
528 </target>
529
530
531
532
533 <!--
534
535 third level targets
536
537 -->
538 <target name="mgpp-add-static">
539 <if><bool><istrue value="${execute}"/></bool>
540 <rsr file="${release.dir}/greenstone3/gs2build/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
541 <exec dir="${release.dir}/greenstone3/gs2build/indexers/mgpp" executable="autoconf" output="${release.dir}/greenstone3/gs2build/indexers/mgpp/configure">
542 <arg line="configure.in"/>
543 </exec>
544 </if>
545 </target>
546 <target name="mg-add-static">
547 <if><bool><istrue value="${execute}"/></bool>
548 <rsr file="${release.dir}/greenstone3/gs2build/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
549 <exec dir="${release.dir}/greenstone3/gs2build/indexers/mg" executable="autoconf" output="${release.dir}/greenstone3/gs2build/indexers/mg/configure">
550 <arg line="configure.in"/>
551 </exec>
552 </if>
553 </target>
554 <target name="gs2buildextra-add-static">
555 <if><bool><istrue value="${execute}"/></bool>
556 <rsr file="${release.dir}/greenstone3/gs2build/gs2build-extra/packages.configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
557 <rsr file="${release.dir}/greenstone3/gs2build/gs2build-extra/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
558 </if>
559 </target>
560
561 <target name="wv-add-static">
562 <if><bool><istrue value="${execute}"/></bool>
563 <rsr file="${release.dir}/greenstone3/gs2build/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
564 </if>
565 </target>
566 <target name="xlhtml-add-static">
567 <if><bool><istrue value="${execute}"/></bool>
568 <rsr file="${release.dir}/greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
569 </if>
570 </target>
571 <target name="ppthtml-add-static">
572 <if><bool><istrue value="${execute}"/></bool>
573 <rsr file="${release.dir}/greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
574 </if>
575 </target>
576 <target name="rtftohtml-add-static">
577 <if><bool><istrue value="${execute}"/></bool>
578 <rsr file="${release.dir}/greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml.{2}EXEEXT.{1}" replacement="-o rtftohtml\$(EXEEXT) -static" />
579 </if>
580 </target>
581 <target name="gdbm-add-static">
582 <if><bool><istrue value="${execute}"/></bool>
583 <rsr file="${release.dir}/greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
584 </if>
585 </target>
586
587 <target name="export-greenstone3">
588 <if><bool><istrue value="${execute}"/></bool>
589 <mkdir dir="${release.dir}/distributions"/>
590 <delete dir="${release.dir}/distribution/greenstone3"/>
591 <svn>
592 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="${release.dir}/distribution/greenstone3"/>
593 </svn>
594 </if>
595 </target>
596
597 <target name="dist-set-version-number-property">
598 <if><bool><istrue value="${execute}"/></bool>
599 <rsr file="${release.dir}/distribution/greenstone3/resources/java/global.properties.in" pattern="@gsdl3version@" replacement="${version}" />
600 </if>
601 </target>
602
603 <target name="create-distributions-1">
604 <if><bool><istrue value="${execute}"/></bool>
605 <ant antfile="${release.dir}/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-1" />
606 </if>
607 </target>
608
609 <target name="create-distributions-2">
610 <if><bool><istrue value="${execute}"/></bool>
611 <ant antfile="${release.dir}/dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-2" />
612 </if>
613 </target>
614
615 <target name="create-distributions-3">
616 <if><bool><istrue value="${execute}"/></bool>
617 <ant antfile="${release.dir}/dist/greenstone3/dist-resources/dist-build.xml" dir="${release.dir}/dist/greenstone3" target="create-distribution-3" />
618 </if>
619 </target>
620
621 <target name="copy-over-build-xml">
622 <if><bool><istrue value="${execute}"/></bool>
623 <move file="${release.dir}/dist/greenstone3/dist-build.xml" tofile="${release.dir}/dist/greenstone3/build.xml"/>
624 </if>
625 </target>
626
627 <target name="insert-user-manual">
628 <if><bool><istrue value="${execute}"/></bool>
629 <copy file="${release.dir}/greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="${release.dir}/distribution/greenstone3/docs/manual/gs2_user_en.pdf"/>
630 </if>
631 </target>
632
633 <target name="insert-compiled-binaries">
634 <if><bool><istrue value="${execute}"/></bool>
635
636 <mkdir dir="${release.dir}/distribution/greenstone3/Linux/lib/jni"/>
637 <exec executable="find"><arg line="${release.dir}/greenstone3/lib/jni ! -name '.' -maxdepth 1 -exec cp {} ${release.dir}/distribution/greenstone3/Linux/lib/jni &#59;"/></exec>
638
639 <mkdir dir="${release.dir}/distribution/greenstone3/gs2build/Unix/bin/linux"/>
640 <exec executable="find"><arg line="${release.dir}/greenstone3/gs2build/bin/linux ! -name '.' -maxdepth 1 -exec cp {} ${release.dir}/distribution/greenstone3/gs2build/Unix/bin/linux &#59;"/></exec>
641
642 <mkdir dir="${release.dir}/distribution/greenstone3/gs2build/bin/java"/>
643 <exec executable="find"><arg line="${release.dir}/greenstone3/gs2build/bin/java ! -name '.' -maxdepth 1 -exec cp {} ${release.dir}/distribution/greenstone3/gs2build/bin/java &#59;"/></exec>
644
645 </if>
646 </target>
647
648
649
650
651</project>
Note: See TracBrowser for help on using the repository browser.