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="export-gsdl-gli">
|
---|
15 | <delete dir="${dest}"/>
|
---|
16 | <svn>
|
---|
17 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="${dest}"/>
|
---|
18 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="${dest}/gli"/>
|
---|
19 | </svn>
|
---|
20 | </target>
|
---|
21 |
|
---|
22 | <target name="drop-in-docs">
|
---|
23 | <echo level="info">Dropping gsdl docs into distribution</echo>
|
---|
24 | <copy todir="${gsdl.basedir}" overwrite="true">
|
---|
25 | <fileset dir="${rk.home}/greenstone2/docs"/>
|
---|
26 | </copy>
|
---|
27 | </target>
|
---|
28 |
|
---|
29 | <target name="gsdl-set-version-numbers">
|
---|
30 |
|
---|
31 | <echo level="info">Setting version in common-src/src/lib/gsdlconf.h</echo>
|
---|
32 | <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
33 |
|
---|
34 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
35 | <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
36 |
|
---|
37 | <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
|
---|
38 |
|
---|
39 | </target>
|
---|
40 |
|
---|
41 | <target name="gsdl-set-dates-in-readmes">
|
---|
42 | <echo level="info">Changing date and version in the docs</echo>
|
---|
43 |
|
---|
44 | <!-- en -->
|
---|
45 | <if><bool><available file="${gsdl.basedir}/READMEen.txt"/></bool>
|
---|
46 | <rsr file="${gsdl.basedir}/READMEen.txt">
|
---|
47 | <job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
|
---|
48 | <job pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
49 | </rsr>
|
---|
50 | </if>
|
---|
51 |
|
---|
52 | <!-- ar -->
|
---|
53 | <if><bool><available file="${gsdl.basedir}/READMEar.txt"/></bool>
|
---|
54 | <rsr file="${gsdl.basedir}/READMEar.txt">
|
---|
55 | <job pattern="(اÙتارÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
|
---|
56 | <job pattern="(اÙÙسخ٠: \s*)(.*)" replacement="$1${version}"/>
|
---|
57 | </rsr>
|
---|
58 | </if>
|
---|
59 |
|
---|
60 | <!-- es -->
|
---|
61 | <if><bool><available file="${gsdl.basedir}/READMEes.txt"/></bool>
|
---|
62 | <rsr file="${gsdl.basedir}/READMEes.txt">
|
---|
63 | <job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
|
---|
64 | <job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}"/>
|
---|
65 | </rsr>
|
---|
66 | </if>
|
---|
67 |
|
---|
68 | <!-- fr -->
|
---|
69 | <if><bool><available file="${gsdl.basedir}/READMEfr.txt"/></bool>
|
---|
70 | <rsr file="${gsdl.basedir}/READMEfr.txt">
|
---|
71 | <job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
|
---|
72 | <job pattern="^(Version\s*)(.*)" replacement="$1${version}"/>
|
---|
73 | </rsr>
|
---|
74 | </if>
|
---|
75 |
|
---|
76 | <!-- ru -->
|
---|
77 | <if><bool><available file="${gsdl.basedir}/READMEru.txt"/></bool>
|
---|
78 | <rsr file="${gsdl.basedir}/READMEru.txt">
|
---|
79 | <job pattern="^(ÐаÑа\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
|
---|
80 | <job pattern="^(ÐеÑÑОÑ\s*)(.*)" replacement="$1${version}"/>
|
---|
81 | </rsr>
|
---|
82 | </if>
|
---|
83 |
|
---|
84 | </target>
|
---|
85 |
|
---|
86 |
|
---|
87 | <target name="insert-export-to-cd-package">
|
---|
88 | <mkdir dir="${gsdl.basedir}/bin/windows"/>
|
---|
89 | <get src="http://greenstone.org/release-snapshots/server.exe" dest="${gsdl.basedir}/bin/windows/server.exe"/>
|
---|
90 | <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
|
---|
91 | <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
|
---|
92 | </target>
|
---|
93 |
|
---|
94 | <target name="create-binary-zip-linux">
|
---|
95 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
96 |
|
---|
97 | <delete dir="${binzip.dir}"/>
|
---|
98 | <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
|
---|
99 |
|
---|
100 | <!-- delete sourcecode -->
|
---|
101 | <delete dir="${binzip.dir}/common-src"/>
|
---|
102 | <delete dir="${binzip.dir}/build-src"/>
|
---|
103 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
104 |
|
---|
105 | <!-- delete loose files -->
|
---|
106 | <delete>
|
---|
107 | <fileset
|
---|
108 | dir="${binzip.dir}"
|
---|
109 | 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"
|
---|
110 | excludes="READMEen.txt"/>
|
---|
111 | </delete>
|
---|
112 |
|
---|
113 | </target>
|
---|
114 |
|
---|
115 | <target name="create-binary-zip-windows">
|
---|
116 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
117 | <copy todir="${binzip.dir}">
|
---|
118 | <fileset dir="distributions/web"/>
|
---|
119 | </copy>
|
---|
120 |
|
---|
121 | <!-- delete sourcecode -->
|
---|
122 | <delete dir="${binzip.dir}/common-src"/>
|
---|
123 | <delete dir="${binzip.dir}/build-src"/>
|
---|
124 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
125 |
|
---|
126 | <!-- delete loose files -->
|
---|
127 | <delete>
|
---|
128 | <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
|
---|
129 | </delete>
|
---|
130 | </target>
|
---|
131 |
|
---|
132 | <target name="create-needed-empty-files">
|
---|
133 | <mkdir dir="${gsdl.basedir}/tmp"/>
|
---|
134 | <chmod dir="${gsdl.basedir}/tmp" perm="a+rwx"/>
|
---|
135 | <echo file="${gsdl.basedir}/etc/usage.txt"></echo>
|
---|
136 | </target>
|
---|
137 |
|
---|
138 | <target name="dist-clean-sourcecode">
|
---|
139 | <delete>
|
---|
140 | <fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/>
|
---|
141 | </delete>
|
---|
142 | <delete dir="distributions/web/common-src"/>
|
---|
143 | <delete dir="distributions/web/build-src"/>
|
---|
144 | <delete dir="distributions/web/runtime-src"/>
|
---|
145 | <!--
|
---|
146 | <svn>
|
---|
147 | <export srcurl="${svn.root}/gsdl/${branch.path}/common-src" destPath="distributions/web/common-src"/>
|
---|
148 | <export srcurl="${svn.root}/gsdl/${branch.path}/build-src" destPath="distributions/web/build-src"/>
|
---|
149 | <export srcurl="${svn.root}/gsdl/${branch.path}/runtime-src" destPath="distributions/web/runtime-src"/>
|
---|
150 | </svn>
|
---|
151 | -->
|
---|
152 | </target>
|
---|
153 |
|
---|
154 | <target name="dist-unzip-packages">
|
---|
155 | <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"/>
|
---|
156 | <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
|
---|
157 | </target>
|
---|
158 |
|
---|
159 | <target name="make-common-src">
|
---|
160 | <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/>
|
---|
161 | <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>
|
---|
162 | </target>
|
---|
163 |
|
---|
164 | <target name="checkout-gsdl-gli">
|
---|
165 | <svn>
|
---|
166 | <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
|
---|
167 | <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
|
---|
168 | </svn>
|
---|
169 | </target>
|
---|
170 |
|
---|
171 | <target name="compile-gli">
|
---|
172 |
|
---|
173 | <!-- default to sh -->
|
---|
174 | <property name="script.format" value="sh"/>
|
---|
175 |
|
---|
176 | <echo>Compiling gli...</echo>
|
---|
177 | <exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/>
|
---|
178 |
|
---|
179 | <echo>Creating jar...</echo>
|
---|
180 | <exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/>
|
---|
181 |
|
---|
182 | <echo>Cleaning up intermediate files...</echo>
|
---|
183 | <delete dir="${glibasedir}/jar"/>
|
---|
184 | <delete dir="${glibasedir}/classes/org"/>
|
---|
185 |
|
---|
186 | <if><bool><isset property="gsdlbasedir"/></bool>
|
---|
187 | <echo>Putting gli server jar in a better place</echo>
|
---|
188 | <exec executable="mv" failonerror="true">
|
---|
189 | <arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" />
|
---|
190 | </exec>
|
---|
191 | </if>
|
---|
192 |
|
---|
193 | </target>
|
---|
194 |
|
---|
195 |
|
---|
196 | </project>
|
---|
197 |
|
---|