1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | ..........................................................
|
---|
5 | September 2007
|
---|
6 | Greenstone3 'release maker' script
|
---|
7 | Oran Fry
|
---|
8 | ..........................................................
|
---|
9 | -->
|
---|
10 |
|
---|
11 | <project name="lirk2-compile" default="compile">
|
---|
12 |
|
---|
13 |
|
---|
14 | <target name="compile">
|
---|
15 |
|
---|
16 | <!-- checkout -->
|
---|
17 | <addressedcall target="checkout-gsdl-indexers-gli" />
|
---|
18 |
|
---|
19 | <!-- configure -->
|
---|
20 | <addressedcall target="add-static-to-configure-in"/>
|
---|
21 | <addressedcall target="set-environment-in-packages-configure"/>
|
---|
22 | <addressedcall target="run-configure"/>
|
---|
23 | <addressedcall target="makefiles-add-static"/>
|
---|
24 |
|
---|
25 | <!-- make -->
|
---|
26 | <addressedcall target="run-make"/>
|
---|
27 | <addressedcall target="fix-wget"/>
|
---|
28 | <addressedcall target="run-make-install"/>
|
---|
29 | <addressedcall target="copy-library-oai"/>
|
---|
30 | <addressedcall target="strip-execs"/>
|
---|
31 |
|
---|
32 | <!-- build collections -->
|
---|
33 | <addressedcall target="build-demo-collection" />
|
---|
34 |
|
---|
35 | </target>
|
---|
36 |
|
---|
37 |
|
---|
38 | <!--
|
---|
39 |
|
---|
40 | second level targets
|
---|
41 |
|
---|
42 | -->
|
---|
43 |
|
---|
44 | <target name="checkout-gsdl-indexers-gli">
|
---|
45 | <if><bool><istrue value="${execute}"/></bool>
|
---|
46 | <svn>
|
---|
47 | <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
|
---|
48 | </svn>
|
---|
49 | <svn>
|
---|
50 | <checkout url="${svn.root}/indexers/${branch.path}" destPath="${basedir}/gsdl/indexers"/>
|
---|
51 | </svn>
|
---|
52 | <svn>
|
---|
53 | <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
|
---|
54 | </svn>
|
---|
55 | </if>
|
---|
56 | </target>
|
---|
57 |
|
---|
58 | <target name="add-static-to-configure-in">
|
---|
59 | <if><bool><istrue value="${execute}"/></bool>
|
---|
60 | <rsr file="${basedir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
|
---|
61 | <exec dir="${basedir}/gsdl" executable="autoconf" output="${basedir}/gsdl/configure"><arg value="configure.in"/></exec>
|
---|
62 | </if>
|
---|
63 | </target>
|
---|
64 |
|
---|
65 | <target name="set-environment-in-packages-configure">
|
---|
66 | <if><bool><istrue value="${execute}"/></bool>
|
---|
67 | <rsr file="${basedir}/gsdl/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
68 | </if>
|
---|
69 | </target>
|
---|
70 |
|
---|
71 | <target name="run-configure">
|
---|
72 | <if><bool><istrue value="${execute}"/></bool>
|
---|
73 | <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure"/>
|
---|
74 | </if>
|
---|
75 | </target>
|
---|
76 |
|
---|
77 | <target name="makefiles-add-static">
|
---|
78 | <if><bool><istrue value="${execute}"/></bool>
|
---|
79 | <rsr file="${basedir}/gsdl/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
80 | <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
81 | <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
82 | <rsr file="${basedir}/gsdl/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static" />
|
---|
83 | </if>
|
---|
84 | </target>
|
---|
85 |
|
---|
86 | <target name="run-make">
|
---|
87 | <if><bool><istrue value="${execute}"/></bool>
|
---|
88 | <exec dir="${basedir}/gsdl" executable="make"/>
|
---|
89 | </if>
|
---|
90 | </target>
|
---|
91 |
|
---|
92 | <target name="fix-wget">
|
---|
93 | <if><bool><istrue value="${execute}"/></bool>
|
---|
94 | <delete file="${basedir}/gsdl/packages/wget/wget-1.9/src/wget"/>
|
---|
95 | <exec dir="${basedir}/gsdl/packages/wget/wget-1.9/src" executable="gcc"><arg line="-O2 -Wall -Wno-implicit -o wget cmpt.o connect.o convert.o cookies.o ftp.o ftp-basic.o ftp-ls.o ftp-opie.o hash.o headers.o host.o html-parse.o html-url.o http.o init.o log.o main.o gen-md5.o netrc.o progress.o rbuf.o recur.o res.o retr.o safe-ctype.o snprintf.o gen_sslfunc.o url.o utils.o version.o -lssl -lcrypto -ldl -static"/></exec>
|
---|
96 | </if>
|
---|
97 | </target>
|
---|
98 |
|
---|
99 |
|
---|
100 | <target name="run-make-install">
|
---|
101 | <if><bool><istrue value="${execute}"/></bool>
|
---|
102 | <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec>
|
---|
103 | </if>
|
---|
104 | </target>
|
---|
105 |
|
---|
106 | <target name="copy-library-oai">
|
---|
107 | <if><bool><istrue value="${execute}"/></bool>
|
---|
108 | <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/linux/library"/></exec>
|
---|
109 | <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/linux/oaiserver"/></exec>
|
---|
110 | </if>
|
---|
111 | </target>
|
---|
112 |
|
---|
113 | <target name="strip-execs">
|
---|
114 | <if><bool><istrue value="${execute}"/></bool>
|
---|
115 | <exec dir="${basedir}/gsdl/bin/linux" executable="find">
|
---|
116 | <arg line="! -name . -type f -maxdepth 1 -exec strip {} ;"/>
|
---|
117 | </exec>
|
---|
118 | </if>
|
---|
119 | </target>
|
---|
120 |
|
---|
121 | <target name="build-demo-collection">
|
---|
122 | <if><bool><istrue value="${execute}"/></bool>
|
---|
123 | <exec dir="${basedir}/gsdl" executable="${lirk2.home}/compile/build-demo.sh"/>
|
---|
124 | </if>
|
---|
125 | </target>
|
---|
126 |
|
---|
127 |
|
---|
128 |
|
---|
129 | </project>
|
---|