source: release-kits/lirk3/ant-scripts/compile.xml@ 17257

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

added the uninstaller to all release kits

File size: 5.9 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-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 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/>
12
13 <antcall target="tweak-configure-scripts" />
14
15 <!-- update -->
16 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/>
17
18 <!-- configure -->
19 <antcall target="regenerate-configure"/>
20 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
21 <antcall target="tweak-makefiles" />
22
23 <!-- build -->
24 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
25 <antcall target="linux-strip-execs" />
26
27 <!-- uninstaller -->
28 <antcall target="compile-uninstaller" /> <!-- from global-targets -->
29
30 <!-- documentation -->
31 <antcall target="prepare-documentation" />
32
33 </target>
34
35 <target name="checkout-greenstone3">
36 <svn>
37 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
38 </svn>
39 </target>
40
41 <target name="set-version-number-property">
42 <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
43 </target>
44
45 <target name="tweak-configure-scripts">
46 <antcall target="mgpp-add-static" />
47 <antcall target="mg-add-static" />
48 <antcall target="gs2build-add-static" />
49 </target>
50
51 <target name="regenerate-configure">
52 <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
53 <arg line="configure.in"/>
54 </exec>
55 <chmod file="greenstone3/gs2build/configure" perm="+x"/>
56 </target>
57
58 <target name="tweak-makefiles">
59 <antcall target="wv-add-static" />
60 <antcall target="xlhtml-add-static" />
61 <antcall target="ppthtml-add-static" />
62 <antcall target="rtftohtml-add-static" />
63 <antcall target="gdbm-add-static" />
64 </target>
65
66 <target name="linux-strip-execs">
67 <exec dir="greenstone3/gs2build/bin/linux" executable="find">
68 <arg line="! -name . -exec strip {} &#59;"/>
69 </exec>
70 </target>
71
72 <target name="prepare-documentation">
73 <mkdir dir="greenstone3/gsdl-manuals"/>
74 <svn>
75 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
76 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
77 </svn>
78 <javac srcdir="greenstone3/gsdl-manuals/shared"
79 destdir="greenstone3/gsdl-manuals/shared"
80 debug="on">
81 <include name="*.java"/>
82 </javac>
83 <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
84
85 <path id="documentation.compile.classpath">
86 <fileset dir="greenstone3/gsdl-manuals">
87 <include name="**/*.jar"/>
88 </fileset>
89 <pathelement path="greenstone3/gsdl-manuals/shared"/>
90 <pathelement path="greenstone3/gsdl-manuals/manuals"/>
91 </path>
92
93 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
94 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
95 <arg value="greenstone3/gli/help/en/help.xml" />
96 <arg value="greenstone3" />
97 </java>
98
99 <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
100 <echo>Run generate-pdf.sh</echo>
101 <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
102 <arg line="generate-pdf.sh u en" />
103 </exec>
104 </target>
105
106 <!--
107
108 third level targets
109
110 -->
111
112 <target name="mgpp-add-static">
113 <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
114 <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure">
115 <arg line="configure.in"/>
116 </exec>
117 </target>
118
119 <target name="mg-add-static">
120 <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
121 <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure">
122 <arg line="configure.in"/>
123 </exec>
124 </target>
125
126 <target name="gs2build-add-static">
127 <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
128 <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
129 <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
130 </target>
131
132 <target name="wv-add-static">
133 <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
134 </target>
135
136 <target name="xlhtml-add-static">
137 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
138 </target>
139
140 <target name="ppthtml-add-static">
141 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
142 </target>
143
144 <target name="rtftohtml-add-static">
145 <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
146 </target>
147
148 <target name="gdbm-add-static">
149 <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
150 </target>
151
152
153</project>
Note: See TracBrowser for help on using the repository browser.