root/release-kits/mark3/ant-scripts/compile.xml @ 17257

Revision 17257, 4.0 KB (checked in by oranfry, 11 years ago)

added the uninstaller to all release kits

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark3-compile" default="compile">
3
4    <target name="compile">
5
6        <!-- checkout -->
7        <antcall target="checkout-greenstone3" />
8
9        <!-- preparation -->
10        <antcall target="set-version-number-property" />
11        <antcall target="set-gdbm-installed-path" />
12        <ant target="prepare-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
13       
14        <!-- update -->
15        <ant target="update-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
16
17        <!-- configure -->
18        <ant target="configure-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
19        <antcall target="tweak-makefiles" />
20
21        <!-- build -->
22        <ant target="build-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/>
23        <antcall target="linux-strip-execs" />
24        <antcall target="compile-search4j" /> <!-- from rk3-targets -->
25
26        <!-- uninstaller -->
27        <antcall target="compile-uninstaller" /> <!-- from global-targets -->
28
29        <!-- documentation -->
30        <antcall target="prepare-documentation" />
31
32    </target>
33
34    <target name="checkout-greenstone3">
35        <svn javahl="false">
36            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
37        </svn>
38    </target>
39
40    <target name="set-version-number-property">
41        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
42    </target>
43
44    <target name="set-gdbm-installed-path">
45        <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/>
46    </target>
47
48    <target name="tweak-makefiles">
49        <rsr
50            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile"
51            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
52            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
53
54        <rsr
55            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile"
56            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
57            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
58
59        <rsr
60            file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile"
61            pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$"
62            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" />
63    </target>
64
65    <target name="linux-strip-execs">
66        <exec dir="greenstone3/gs2build/bin/darwin" executable="find">
67            <arg line=". ! -name . -exec strip {} &#59;"/>
68        </exec>
69    </target>
70
71    <target name="prepare-documentation">
72        <mkdir dir="greenstone3/gsdl-manuals"/>
73        <svn javahl="false">
74            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
75            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
76        </svn>
77        <javac srcdir="greenstone3/gsdl-manuals/shared"
78              destdir="greenstone3/gsdl-manuals/shared"
79              debug="on">
80            <include name="*.java"/>
81        </javac>
82        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
83
84        <path id="documentation.compile.classpath">
85            <fileset dir="greenstone3/gsdl-manuals">
86                <include name="**/*.jar"/>
87            </fileset>
88            <pathelement path="greenstone3/gsdl-manuals/shared"/>
89            <pathelement path="greenstone3/gsdl-manuals/manuals"/>
90        </path>
91
92        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
93            <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
94            <arg value="greenstone3/gli/help/en/help.xml" />
95            <arg value="greenstone3" />
96        </java>
97
98        <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
99        <echo>Run generate-pdf.sh</echo>
100        <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
101            <arg line="generate-pdf.sh u en" />
102        </exec>
103    </target>
104
105</project>
106
Note: See TracBrowser for help on using the browser.