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

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

created the merged rk2

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