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

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

changes to get apache into the release and working

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