1 | <?xml version="1.0" encoding="utf-8" ?> |
---|
2 | <!-- |
---|
3 | ..........................................................
|
---|
4 | July 2009
|
---|
5 | Source Release Kit for Greenstone3 (sork3) |
---|
6 | Oran Fry |
---|
7 | .......................................................... |
---|
8 | --> |
---|
9 | |
---|
10 | <project name="sork3-build" default="sork3"> |
---|
11 | |
---|
12 | <!-- IMPORT OTHER ANT SCRIPTS --> |
---|
13 | <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/> |
---|
14 | <import file="${rk.home}/shared/greenstone3/ant-scripts/greenstone3-shared.xml"/> |
---|
15 | |
---|
16 | <!-- THE MAIN TARGET --> |
---|
17 | <target name="sork3" depends="init,gs3-init"> |
---|
18 | |
---|
19 | <!-- store the name of the distribution --> |
---|
20 | <property name="dist.name" value="Greenstone-${version}-source-distribution"/> |
---|
21 | |
---|
22 | <!-- export the greenstone3 base code --> |
---|
23 | <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone3"/><arg value="distributions/${dist.name}"/></exec> |
---|
24 | |
---|
25 | <!-- set version numbers --> |
---|
26 | <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distributions/${dist.name}"/></antcall> |
---|
27 | |
---|
28 | <!-- run ant prepare --> |
---|
29 | <ant dir="distributions/${dist.name}" target="prepare"> |
---|
30 | <property name="properties.accepted" value="true"/> |
---|
31 | <property name="app.version" value="${version}"/> |
---|
32 | </ant> |
---|
33 | |
---|
34 | <!-- set gli version numbers --> |
---|
35 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall> |
---|
36 | |
---|
37 | <!-- insert windows binaries --> |
---|
38 | <delete dir="distributions/${dist.name}/gs2build/bin/windows"/> |
---|
39 | <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/><arg value="distributions/${dist.name}/gs2build/bin/windows"/></exec> |
---|
40 | <delete dir="distributions/${dist.name}/gs2build/bin/windows/imagemagick"/> |
---|
41 | <delete dir="distributions/${dist.name}/gs2build/bin/windows/ghostscript"/> |
---|
42 | |
---|
43 | <!-- insert windows perl --> |
---|
44 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/gs2build/bin/windows"/> |
---|
45 | |
---|
46 | <!-- clean up --> |
---|
47 | <delete file="distributions/${dist.name}/gs2build/bin/linux/mgquery_old" /> |
---|
48 | <delete file="distributions/${dist.name}/build.properties.in"/> |
---|
49 | <delete><fileset dir="distributions/${dist.name}/packages" includes="**/*.zip,**/*.tar.gz"/></delete> |
---|
50 | |
---|
51 | <!-- run greenstone3's own targets for fixing execute permissions --> |
---|
52 | <ant dir="distributions/${dist.name}"> |
---|
53 | <target name="fix-execute-permissions"/> |
---|
54 | <target name="fix-execute-permissions-source"/> |
---|
55 | </ant> |
---|
56 | |
---|
57 | <!-- create the archives --> |
---|
58 | <mkdir dir="products"/> |
---|
59 | <delete file="products/${dist.name}.zip"/> |
---|
60 | <zip destfile="products/${dist.name}.zip" basedir="distributions" includes="${dist.name}/**/*"/> |
---|
61 | <exec dir="distributions" executable="tar"> |
---|
62 | <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/> |
---|
63 | </exec> |
---|
64 | |
---|
65 | <!-- create the sourcecode component --> |
---|
66 | <ant dir="." antfile="${rk.home}/kits/${rk.name}/ant-scripts/create-sourcecode-component.xml" target="create-sourcecode-component"/> |
---|
67 | </target> |
---|
68 | |
---|
69 | <target name="properties" depends="core-properties,gs3-properties"/> |
---|
70 | |
---|
71 | </project> |
---|