source: release-kits/lirk2/ant-scripts/compile.xml@ 17898

Last change on this file since 17898 was 17898, checked in by oranfry, 15 years ago

Standardised names of directories used in release kits

  • gsdl and greenstone3 -> compiled
  • distribution and distributions -> distributions
  • greenstone3 and web -> web

And, expect more specifically named properties files, e.g., lirk3-build.properties, wirk2-build.properties

File size: 3.4 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk2-compile" default="compile">
3
4 <target name="compile">
5
6 <!-- checkout -->
7 <antcall target="checkout-gsdl-gli" />
8 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
9
10 <!-- configure -->
11 <antcall target="add-static-to-configure-in"/>
12 <antcall target="set-environment-in-packages-configure"/>
13 <antcall target="run-configure"/>
14 <antcall target="makefiles-add-static"/>
15
16 <!-- make -->
17 <antcall target="run-make"/>
18 <antcall target="run-make-install"/>
19 <antcall target="copy-library-oai"/>
20 <antcall target="strip-execs"/>
21
22 <!-- uninstaller -->
23 <antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
24
25 <!-- build collections -->
26 <antcall target="build-demo-collection" />
27
28 </target>
29
30 <target name="checkout-gsdl-gli">
31 <svn>
32 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
33 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
34 </svn>
35 </target>
36
37 <target name="add-static-to-configure-in">
38 <rsr
39 file="${basedir}/compiled/configure.in"
40 pattern="^LDFLAGS=.*$"
41 replacement="LDFLAGS=-static" />
42 <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure"><arg value="configure.in"/></exec>
43 </target>
44
45 <target name="set-environment-in-packages-configure">
46 <rsr
47 file="${basedir}/compiled/common-src/packages/configure"
48 pattern="^ENVIRONMENT=.*$"
49 replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
50 <rsr
51 file="${basedir}/compiled/build-src/packages/configure"
52 pattern="^ENVIRONMENT=.*$"
53 replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" />
54 </target>
55
56 <target name="run-configure">
57 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure">
58 <env key="LDFLAGS" value="-static"/>
59 </exec>
60 </target>
61
62 <target name="makefiles-add-static">
63 <rsr
64 file="${basedir}/compiled/build-src/packages/wv/wv-gs/Makefile"
65 pattern="^LDFLAGS =.*$"
66 replacement="LDFLAGS = -static" />
67 <rsr
68 file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile"
69 pattern="^LDFLAGS =.*$"
70 replacement="LDFLAGS = -static" />
71 <rsr
72 file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile"
73 pattern="^LDFLAGS =.*$"
74 replacement="LDFLAGS = -static" />
75 <rsr
76 file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile"
77 pattern="(-o rtftohtml.{2}EXEEXT.{1})"
78 replacement="$1 -static" />
79 </target>
80
81 <target name="run-make">
82 <exec dir="${basedir}/compiled" executable="make"/>
83 </target>
84
85
86 <target name="run-make-install">
87 <exec dir="${basedir}/compiled" executable="make"><arg value="install"/></exec>
88 </target>
89
90 <target name="copy-library-oai">
91 <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/library ${basedir}/compiled/bin/linux/library"/></exec>
92 <exec executable="mv"><arg line="${basedir}/compiled/cgi-bin/oaiserver ${basedir}/compiled/bin/linux/oaiserver"/></exec>
93 </target>
94
95 <target name="strip-execs">
96 <exec dir="${basedir}/compiled/bin/linux" executable="find">
97 <arg line="! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
98 </exec>
99 </target>
100
101 <target name="build-demo-collection">
102 <exec dir="${basedir}/compiled" executable="${lirk2.home}/resources/build-demo.sh"/>
103 </target>
104
105
106
107</project>
Note: See TracBrowser for help on using the repository browser.