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

Last change on this file since 23644 was 23644, checked in by sjm84, 10 years ago

A few more fixes to the release-kits for powerpc Mac

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