1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="rk3-compile">
|
---|
3 |
|
---|
4 | <target name="compile">
|
---|
5 |
|
---|
6 | <!-- checkout greenstone3 -->
|
---|
7 | <exec executable="svn">
|
---|
8 | <arg value="checkout"/>
|
---|
9 | <arg value="${svn.root}/main/${branch.path}/greenstone3"/>
|
---|
10 | <arg value="compiled"/>
|
---|
11 | <arg value="-r"/><arg value="${branch.revision}"/>
|
---|
12 | </exec>
|
---|
13 |
|
---|
14 | <antcall target="persist-forwarded-properties">
|
---|
15 | <param name="greenstone3basedir" value="compiled"/>
|
---|
16 | </antcall>
|
---|
17 |
|
---|
18 | <!-- make sure all c++ compilation is done statically on linux -->
|
---|
19 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
20 | <property name="forward.compile.static" value="true"/>
|
---|
21 | </if>
|
---|
22 |
|
---|
23 | <!-- run greenstone3's ant prepare -->
|
---|
24 | <ant dir="compiled" inheritAll="false">
|
---|
25 | <target name="prepare"/>
|
---|
26 | <propertyset refid="forward.properties"/>
|
---|
27 | <property name="properties.accepted" value="true"/>
|
---|
28 | </ant>
|
---|
29 |
|
---|
30 | <!-- set all version numbers -->
|
---|
31 | <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
|
---|
32 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
33 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
|
---|
34 |
|
---|
35 | <!-- run greenstone3's ant install and ant dist-tidy -->
|
---|
36 | <ant dir="compiled" inheritAll="false">
|
---|
37 | <target name="install"/>
|
---|
38 | <target name="dist-tidy"/>
|
---|
39 | <propertyset refid="forward.properties"/>
|
---|
40 | <property name="properties.accepted" value="true"/>
|
---|
41 | </ant>
|
---|
42 |
|
---|
43 | <!-- insert an xml parser -->
|
---|
44 | <copy todir="compiled/gs2build/perllib/cpan">
|
---|
45 | <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
|
---|
46 | </copy>
|
---|
47 |
|
---|
48 | <!-- insert ant -->
|
---|
49 | <mkdir dir="compiled/packages"/>
|
---|
50 | <get src="http://www.greenstone.org/gs3files/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
|
---|
51 | <untar src="compiled/packages/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
|
---|
52 | <move file="compiled/packages/apache-ant-1.8.0" tofile="compiled/packages/ant"/>
|
---|
53 | <delete file="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
|
---|
54 |
|
---|
55 |
|
---|
56 | <!-- put the uninstaller in place -->
|
---|
57 | <antcall target="insert-and-compile-uninstaller"/>
|
---|
58 |
|
---|
59 | <!-- (windows only) -->
|
---|
60 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
61 | <!-- insert perl -->
|
---|
62 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
|
---|
63 | </if>
|
---|
64 |
|
---|
65 | <!-- minify tomcat -->
|
---|
66 | <delete dir="compiled/packages/tomcat/webapps/docs"/>
|
---|
67 | <delete dir="compiled/packages/tomcat/webapps/examples"/>
|
---|
68 |
|
---|
69 | <!-- tidy up gli to make it smaller -->
|
---|
70 | <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
71 |
|
---|
72 | <!-- strip out .svn dirs -->
|
---|
73 | <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
|
---|
74 |
|
---|
75 | <!-- (linux only) -->
|
---|
76 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
77 | <!-- grab imagemagick binaries -->
|
---|
78 | <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
79 | <exec executable="svn">
|
---|
80 | <arg value="export"/>
|
---|
81 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
|
---|
82 | <arg value="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
83 | </exec>
|
---|
84 |
|
---|
85 | <!-- grab wv binaries -->
|
---|
86 | <delete dir="compiled/gs2build/bin/linux/wv"/>
|
---|
87 | <exec executable="svn">
|
---|
88 | <arg value="export"/>
|
---|
89 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
|
---|
90 | <arg value="compiled/gs2build/bin/linux/wv"/>
|
---|
91 | </exec>
|
---|
92 | <!-- (mac only) -->
|
---|
93 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
94 | <!-- grab imagemagick binaries -->
|
---|
95 | <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
96 | <exec executable="svn">
|
---|
97 | <arg value="export"/>
|
---|
98 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
|
---|
99 | <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
100 | </exec>
|
---|
101 |
|
---|
102 | <!-- grab ghostscript binaries -->
|
---|
103 | <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
104 | <exec executable="svn">
|
---|
105 | <arg value="export"/>
|
---|
106 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
|
---|
107 | <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
108 | </exec>
|
---|
109 | </if></else></if>
|
---|
110 |
|
---|
111 | </target>
|
---|
112 |
|
---|
113 | </project>
|
---|