source: main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml@ 22939

Last change on this file since 22939 was 22939, checked in by sjm84, 14 years ago

Making sure the gnome-lib extension does not compile for versions before 2.84

File size: 6.0 KB
Line 
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 <!-- make sure all c++ compilation is done statically on linux -->
15 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
16 <property name="forward.compile.static" value="true"/>
17 </if>
18
19 <!-- make sure the c++ compilation can see the support library in the extension folder -->
20 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
21 <property name="forward.use.support.lib" value="true"/>
22 </if>
23
24 <antcall target="persist-forwarded-properties">
25 <param name="greenstone3basedir" value="compiled"/>
26 </antcall>
27
28 <!-- run greenstone3's ant prepare -->
29 <ant dir="compiled" inheritAll="false">
30 <target name="prepare"/>
31 <propertyset refid="forward.properties"/>
32 <property name="properties.accepted" value="true"/>
33 </ant>
34
35 <!-- set all version numbers -->
36 <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
37 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
38 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
39
40 <!-- mac or linux: compile the support library -->
41 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
42 <!-- checkout the gnome support library extension-->
43 <if><bool><or>
44 <equals arg1="${branch.path}" arg2="trunk"/>
45 <equals arg1="${branch.path}" arg2="tags/stable"/>
46 <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
47 </or></bool>
48 <echo>COMPILING GNOME LIB EXTENSION</echo>
49 <exec executable="svn">
50 <arg value="checkout"/>
51 <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk"/>
52 <arg value="${basedir}/compiled/ext/gnome-lib"/>
53 </exec>
54 <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib">
55 <arg value="-c"/>
56 <arg value="./CASCADE-MAKE.sh"/>
57 </exec>
58 <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
59 </if>
60
61 <!-- run greenstone3's ant install and ant dist-tidy -->
62 <ant dir="compiled" inheritAll="false">
63 <target name="install"/>
64 <target name="dist-tidy"/>
65 <propertyset refid="forward.properties"/>
66 <property name="properties.accepted" value="true"/>
67 </ant>
68
69 <!-- Delete the entire gnome support library on Linux -->
70 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
71 <delete dir="${basedir}/compiled/ext/gnome-lib"/>
72 </if>
73
74 <!-- Delete all but the lib folder of the gnome support library on Mac -->
75 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
76 <delete dir="${basedir}/compiled/ext/gnome-lib/cascade-make"/>
77 <delete dir="${basedir}/compiled/ext/gnome-lib/packages"/>
78 <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/bin"/>
79 <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/etc"/>
80 <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/include"/>
81 <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/share"/>
82 <delete file="${basedir}/compiled/ext/gnome-lib/setup.bat"/>
83 <delete file="${basedir}/compiled/ext/gnome-lib/CASCADE-MAKE.sh"/>
84 </if>
85
86 <!-- insert an xml parser -->
87 <copy todir="compiled/gs2build/perllib/cpan">
88 <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
89 </copy>
90
91 <!-- insert ant -->
92 <mkdir dir="compiled/packages"/>
93 <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"/>
94 <untar src="compiled/packages/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
95 <move file="compiled/packages/apache-ant-1.8.0" tofile="compiled/packages/ant"/>
96 <delete file="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
97
98
99 <!-- put the uninstaller in place -->
100 <antcall target="insert-and-compile-uninstaller"/>
101
102 <!-- (windows only) -->
103 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
104 <!-- insert perl -->
105 <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
106 </if>
107
108 <!-- minify tomcat -->
109 <delete dir="compiled/packages/tomcat/webapps/docs"/>
110 <delete dir="compiled/packages/tomcat/webapps/examples"/>
111
112 <!-- tidy up gli to make it smaller -->
113 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
114
115 <!-- strip out .svn dirs -->
116 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
117
118 <!-- (linux only) -->
119 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
120 <!-- grab imagemagick binaries -->
121 <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
122 <exec executable="svn">
123 <arg value="export"/>
124 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
125 <arg value="compiled/gs2build/bin/linux/imagemagick"/>
126 </exec>
127
128 <!-- grab wv binaries -->
129 <delete dir="compiled/gs2build/bin/linux/wv"/>
130 <exec executable="svn">
131 <arg value="export"/>
132 <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
133 <arg value="compiled/gs2build/bin/linux/wv"/>
134 </exec>
135 <!-- (mac only) -->
136 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
137 <!-- grab imagemagick binaries -->
138 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
139 <exec executable="svn">
140 <arg value="export"/>
141 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
142 <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
143 </exec>
144
145 <!-- grab ghostscript binaries -->
146 <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
147 <exec executable="svn">
148 <arg value="export"/>
149 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
150 <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
151 </exec>
152 </if></else></if>
153
154 </target>
155
156</project>
Note: See TracBrowser for help on using the repository browser.