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 | <addressedcall target="insert-windows-perl" />
|
---|
19 |
|
---|
20 | <!-- configure -->
|
---|
21 | <addressedcall target="add-static-to-configure-in"/>
|
---|
22 | <addressedcall target="set-environment-in-packages-configure"/>
|
---|
23 | <addressedcall target="run-configure"/>
|
---|
24 | <addressedcall target="makefiles-add-static"/>
|
---|
25 |
|
---|
26 | <!-- make -->
|
---|
27 | <addressedcall target="run-make"/>
|
---|
28 | <addressedcall target="fix-wget"/>
|
---|
29 | <addressedcall target="run-make-install"/>
|
---|
30 | <addressedcall target="copy-library-oai"/>
|
---|
31 | <addressedcall target="strip-execs"/>
|
---|
32 |
|
---|
33 | <!-- build collections -->
|
---|
34 | <addressedcall target="build-demo-collection" />
|
---|
35 |
|
---|
36 | </target>
|
---|
37 |
|
---|
38 |
|
---|
39 | <!--
|
---|
40 |
|
---|
41 | second level targets
|
---|
42 |
|
---|
43 | -->
|
---|
44 |
|
---|
45 | <target name="checkout-gsdl-indexers-gli">
|
---|
46 | <if><bool><istrue value="${execute}"/></bool>
|
---|
47 | <svn>
|
---|
48 | <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
|
---|
49 | </svn>
|
---|
50 | <svn>
|
---|
51 | <checkout url="${svn.root}/indexers/${branch.path}" destPath="${basedir}/gsdl/indexers"/>
|
---|
52 | </svn>
|
---|
53 | <svn>
|
---|
54 | <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
|
---|
55 | </svn>
|
---|
56 | </if>
|
---|
57 | </target>
|
---|
58 |
|
---|
59 | <target name="insert-windows-perl">
|
---|
60 | <if><bool><istrue value="${execute}"/></bool>
|
---|
61 | <mkdir dir="${basedir}/gsdl/bin/windows"/>
|
---|
62 | <delete dir="${basedir}/gsdl/bin/windows/perl"/>
|
---|
63 | <exec executable="cp"><arg line="-r ${lirk2.home}/resources/perl-for-windows ${basedir}/gsdl/bin/windows/perl"/></exec>
|
---|
64 | </if>
|
---|
65 | </target>
|
---|
66 |
|
---|
67 | <target name="add-static-to-configure-in">
|
---|
68 | <if><bool><istrue value="${execute}"/></bool>
|
---|
69 | <rsr file="${basedir}/gsdl/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
|
---|
70 | <exec dir="${basedir}/gsdl" executable="autoconf" output="${basedir}/gsdl/configure"><arg value="configure.in"/></exec>
|
---|
71 | </if>
|
---|
72 | </target>
|
---|
73 |
|
---|
74 | <target name="set-environment-in-packages-configure">
|
---|
75 | <if><bool><istrue value="${execute}"/></bool>
|
---|
76 | <rsr file="${basedir}/gsdl/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
77 | </if>
|
---|
78 | </target>
|
---|
79 |
|
---|
80 | <target name="run-configure">
|
---|
81 | <if><bool><istrue value="${execute}"/></bool>
|
---|
82 | <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure"/>
|
---|
83 | </if>
|
---|
84 | </target>
|
---|
85 |
|
---|
86 | <target name="makefiles-add-static">
|
---|
87 | <if><bool><istrue value="${execute}"/></bool>
|
---|
88 | <rsr file="${basedir}/gsdl/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
89 | <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
90 | <rsr file="${basedir}/gsdl/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" />
|
---|
91 | <rsr file="${basedir}/gsdl/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static" />
|
---|
92 | </if>
|
---|
93 | </target>
|
---|
94 |
|
---|
95 | <target name="run-make">
|
---|
96 | <if><bool><istrue value="${execute}"/></bool>
|
---|
97 | <exec dir="${basedir}/gsdl" executable="make"/>
|
---|
98 | </if>
|
---|
99 | </target>
|
---|
100 |
|
---|
101 | <target name="fix-wget">
|
---|
102 | <if><bool><istrue value="${execute}"/></bool>
|
---|
103 | <delete file="${basedir}/gsdl/packages/wget/wget-1.9/src/wget"/>
|
---|
104 | <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>
|
---|
105 | </if>
|
---|
106 | </target>
|
---|
107 |
|
---|
108 |
|
---|
109 | <target name="run-make-install">
|
---|
110 | <if><bool><istrue value="${execute}"/></bool>
|
---|
111 | <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec>
|
---|
112 | </if>
|
---|
113 | </target>
|
---|
114 |
|
---|
115 | <target name="copy-library-oai">
|
---|
116 | <if><bool><istrue value="${execute}"/></bool>
|
---|
117 | <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/linux/library"/></exec>
|
---|
118 | <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/linux/oaiserver"/></exec>
|
---|
119 | </if>
|
---|
120 | </target>
|
---|
121 |
|
---|
122 | <target name="strip-execs">
|
---|
123 | <if><bool><istrue value="${execute}"/></bool>
|
---|
124 | <exec dir="${basedir}/gsdl/bin/linux" executable="find">
|
---|
125 | <arg line="! -name . -type f -maxdepth 1 -exec strip {} ;"/>
|
---|
126 | </exec>
|
---|
127 | </if>
|
---|
128 | </target>
|
---|
129 |
|
---|
130 | <target name="build-demo-collection">
|
---|
131 | <if><bool><istrue value="${execute}"/></bool>
|
---|
132 | <exec dir="${basedir}/gsdl" executable="${lirk2.home}/compile/build-demo.sh"/>
|
---|
133 | </if>
|
---|
134 | </target>
|
---|
135 |
|
---|
136 |
|
---|
137 |
|
---|
138 | </project>
|
---|