root/main/trunk/release-kits/kits/derk/ant-scripts/build.xml @ 21648

Revision 21648, 2.8 KB (checked in by oranfry, 11 years ago)

tidy-ups

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        April 2009
5        Documented Example Release Kit (derk)
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="derk-build" default="derk">
11
12    <!-- CONSTANTS -->
13
14    <!-- for the benefit of the shared scripts, set release-kit home -->
15    <property name="rk.name" value="derk"/>
16    <property name="rk.home" value="${derk.home}" />
17    <property name="rk.os" value="multi" />
18    <property name="os.suffix" value="AnyPlatform"/>
19   
20    <!-- IMPORT OTHER ANT SCRIPTS -->
21    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
22
23    <!-- THE MAIN TARGET -->
24    <target name="derk" depends="init">
25        <antcall target="export-dec"/>
26        <antcall target="tweak-files"/>
27        <antcall target="prepare-gs2build"/>
28        <antcall target="build-collections"/>
29        <antcall target="create-archives"/>
30    </target>
31
32    <target name="properties">
33        <echo>Required Properties:</echo>
34        <echo>version           the version string for the release</echo>
35        <echo/>
36
37        <echo>Optional Properties:</echo>
38        <echo>branch.path       the branch of gs2build to use to build collections. Default: trunk.</echo>
39        <echo/>
40    </target>
41
42    <target name="export-dec">
43        <if><bool><not><available file="dec"/></not></bool>
44            <svn>
45                <export srcurl="${svn.root}/documented-examples/${branch.path}" destPath="documented-examples"/>
46            </svn>
47        </if>
48    </target>
49
50    <target name="tweak-files">
51        <delete file="documented-examples/text-for-translation.txt"/>
52    </target>
53
54    <target name="prepare-gs2build">
55        <if>
56            <bool><not><available file="gs2build"/></not></bool>
57            <svn>
58                <export srcurl="${svn.root}/main/${branch.path}/gs2build" destPath="gs2build"/>
59            </svn>
60        </if>
61
62        <if>
63            <bool><not><available file="gs2build/Makefile"/></not></bool>
64            <exec dir="gs2build" executable="/bin/bash" failonerror="true"><arg value="./configure"/></exec>
65            <exec dir="gs2build/common-src" executable="make" failonerror="true"/>
66            <exec dir="gs2build/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
67            <exec dir="gs2build" executable="/bin/bash" failonerror="true"><arg value="./configure"/></exec>
68            <exec dir="gs2build" executable="make" failonerror="true"/>
69            <exec dir="gs2build" executable="make" failonerror="true"><arg value="install"/></exec>
70        </if>
71    </target>
72
73    <target name="build-collections">
74        <exec dir="gs2build" executable="${derk.home}/resources/build.sh" failonerror="true"/>
75    </target>
76
77    <target name="create-archives">
78        <mkdir dir="products"/>
79        <zip destfile="products/Greenstone-documented-examples-${version}.zip"  basedir="." includes="documented-examples/**/*"/>
80        <exec executable="tar">
81            <arg line="-czf products/Greenstone-documented-examples-${version}.tar.gz documented-examples"/>
82        </exec>
83    </target>
84
85</project>
Note: See TracBrowser for help on using the browser.