source: release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml@ 20929

Last change on this file since 20929 was 20929, checked in by oranfry, 12 years ago

use the systems own svn client to check things out, not svnant

File size: 6.6 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3 ..........................................................
4 August 2008
5 Targets for Greenstone2 release kits
6 Oran Fry
7 ..........................................................
8-->
9
10<project name="rk2-targets">
11
12 <property name="version.major" value="2"/>
13
14 <target name="gs2-init">
15 <property name="server.exe.location" value="http://www.greenstone.org/caveat-emptor/server-${version}-candidate-${date}.exe" />
16 <echo message="server.exe.location: ${server.exe.location}"/>
17 </target>
18
19 <target name="export-gsdl-gli">
20 <delete dir="${dest}"/>
21 <exec excutable="svn">
22 <arg value="export"/>
23 <arg value="${svn.root}/gsdl/${branch.path}"/>
24 <arg value="${dest}"/>
25 </exec>
26 <exec executable="svn">
27 <arg value="export"/>
28 <arg value="${svn.root}/gli/${branch.path}"/>
29 <arg value="${dest}/gli"/>
30 </exec>
31 </target>
32
33 <target name="drop-in-docs">
34 <echo level="info">Dropping gsdl docs into distribution</echo>
35 <copy todir="${gsdl.basedir}" overwrite="true">
36 <fileset dir="${rk.home}/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
37 </copy>
38 </target>
39
40 <target name="insert-export-to-cd-package">
41 <mkdir dir="${gsdl.basedir}/bin/windows"/>
42 <get src="${server.exe.location}" dest="${gsdl.basedir}/bin/windows/server.exe"/>
43 <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
44 <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
45 </target>
46
47 <target name="create-binary-zip-unix">
48 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
49
50 <delete dir="${binzip.dir}"/>
51 <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
52
53 <!-- delete sourcecode -->
54 <delete dir="${binzip.dir}/common-src"/>
55 <delete dir="${binzip.dir}/build-src"/>
56 <delete dir="${binzip.dir}/runtime-src"/>
57
58 <!-- delete loose files -->
59 <delete>
60 <fileset
61 dir="${binzip.dir}"
62 includes="README*.txt,Uninstall.sh,uninst.jar,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in"
63 excludes="READMEen.txt"/>
64 </delete>
65
66 </target>
67
68 <target name="create-binary-zip-windows">
69 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
70 <copy todir="${binzip.dir}">
71 <fileset dir="distributions/web"/>
72 </copy>
73
74 <!-- delete sourcecode -->
75 <delete dir="${binzip.dir}/common-src"/>
76 <delete dir="${binzip.dir}/build-src"/>
77 <delete dir="${binzip.dir}/runtime-src"/>
78
79 <!-- delete loose files -->
80 <delete>
81 <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
82 </delete>
83 </target>
84
85 <target name="create-needed-empty-files">
86 <mkdir dir="${gsdl.basedir}/tmp"/>
87 <chmod dir="${gsdl.basedir}/tmp" perm="a+rwx"/>
88 <echo file="${gsdl.basedir}/etc/usage.txt"></echo>
89 </target>
90
91 <target name="dist-clean-sourcecode">
92
93 <!-- delete the sourcecode -->
94 <delete>
95 <fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
96 </delete>
97 <delete dir="distributions/web/common-src"/>
98 <delete dir="distributions/web/build-src"/>
99 <delete dir="distributions/web/runtime-src"/>
100 <delete>
101 <fileset dir="distributions/web" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h"/>
102 </delete>
103
104 </target>
105
106 <target name="dist-unzip-packages">
107 <untar src="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/distributions/web/common-src/packages/sqlite" compression="gzip"/>
108 <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
109 </target>
110
111 <target name="make-common-src">
112 <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
113 <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
114 </target>
115
116 <target name="checkout-gsdl-gli">
117 <echo>${svn.root}/gsdl/${branch.path}</echo>
118 <exec executable="svn">
119 <arg value="checkout"/>
120 <arg value="${svn.root}/gsdl/${branch.path}"/>
121 <arg value="${basedir}/compiled"/>
122 </exec>
123 <exec executable="svn">
124 <arg value="checkout"/>
125 <arg value="${svn.root}/gli/${branch.path}"/>
126 <arg value="${basedir}/compiled/gli"/>
127 </exec>
128 </target>
129
130 <target name="compile-gli">
131
132 <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
133 <property name="script.format" value="sh"/>
134 <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
135 <property name="script.format" value="bat"/>
136 </if></else></if>
137
138 <echo>Compiling gli...</echo>
139 <exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
140
141 <echo>Creating jar...</echo>
142 <exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
143
144 <echo>Cleaning up intermediate files...</echo>
145 <delete dir="${glibasedir}/jar"/>
146 <delete dir="${glibasedir}/classes/org"/>
147
148 <if><bool><isset property="gsdlbasedir"/></bool>
149 <echo>Putting gli server jar in a better place</echo>
150 <exec executable="mv" failonerror="true">
151 <arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
152 </exec>
153 </if>
154
155 </target>
156
157 <target name="clean">
158 <antcall target="clean-compiled"/>
159 <antcall target="clean-distributions"/>
160 <antcall target="clean-components"/>
161 <antcall target="clean-installer"/>
162 <antcall target="clean-wrapped-installer"/>
163 <antcall target="clean-cdrom"/>
164 </target>
165
166 <target name="clean-compiled">
167 <delete dir="compiled"/>
168 </target>
169
170 <target name="clean-distribution">
171 <delete dir="distributions"/>
172 </target>
173
174 <target name="clean-components">
175 <delete dir="components"/>
176 </target>
177
178 <target name="clean-installer">
179 <delete dir="installer"/>
180 </target>
181
182 <target name="clean-wrapped-installer">
183 <delete dir="wrapped-installer"/>
184 </target>
185
186 <target name="clean-cdrom">
187 <delete dir="cdrom"/>
188 </target>
189
190 <target name="copy-greenstone2-installer-files">
191
192 <!-- the installer descriptors -->
193 <copy todir="installer" file="${rk.home}/greenstone2/installer/antinstall-config.xml" overwrite="true"/>
194 <copy todir="installer" file="${rk.home}/greenstone2/installer/build.xml" overwrite="true"/>
195
196 </target>
197
198</project>
199
Note: See TracBrowser for help on using the repository browser.