root/release-kits/sork2/ant-scripts/build.xml @ 19386

Revision 19386, 5.8 KB (checked in by oranfry, 10 years ago)

start on work to create a single multi-platform sourcecode archive

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        November 2008
5        Source Release Kit for Greenstone2 (sork2)
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="sork2-build" default="sork2">
11
12    <!-- CONSTANTS -->
13
14    <!-- for the benefit of the shared scripts, set release-kit home -->
15    <property name="rk.name" value="sork2"/>
16    <property name="rk.home" value="${sork2.home}" />
17    <property name="rk.os" value="multi" />
18    <property name="os.suffix" value="AnyPlatform"/>
19   
20    <!-- IMPORT OTHER ANT SCRIPTS -->
21    <import file="../core/ant-scripts/init.xml"/>
22    <import file="../core/ant-scripts/operations-on-gli.xml"/>
23    <import file="../greenstone2/ant-scripts/rk2-targets.xml"/>
24
25    <!-- THE MAIN TARGET -->
26    <target name="sork2" depends="init">
27        <antcall target="export-gsdl-gli"><param name="dest" value="distributions/Greenstone-${version}-source"/></antcall>
28        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/Greenstone-${version}-source"/></antcall>
29        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/Greenstone-${version}-source/gli"/></antcall>
30        <antcall target="insert-winbin"/>
31        <antcall target="insert-windows-perl"><param name="gsdl.basedir" value="${basedir}/distributions/Greenstone-${version}-source"/></antcall>
32        <antcall target="tweak-files" />
33        <antcall target="create-archives"/>
34        <antcall target="create-sourcecode"/>
35    </target>
36
37    <target name="properties">
38        <echo>Required Properties:</echo>
39        <echo>version             the version string for the release</echo>
40        <echo/>
41
42        <echo>Optional Properties:</echo>
43        <echo>branch.path         the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo>
44        <echo>branch.revision     the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo>
45        <echo/>
46    </target>
47
48
49    <target name="tweak-files">
50        <delete file="distributions/Greenstone-${version}-source/bin/linux/mgquery_old" />
51    </target>
52
53    <target name="insert-winbin">
54        <delete dir="distributions/Greenstone-${version}-source/bin/windows"/>
55        <svn>
56            <export srcurl="${svn.root}/other-projects/trunk/winbin/bin" destPath="distributions/Greenstone-${version}-source/bin/windows"/>
57        </svn>
58        <get src="http://greenstone.org/release-snapshots/server.exe" dest="distributions/Greenstone-${version}-source/bin/windows/server.exe"/>
59       
60        <delete dir="distributions/Greenstone-${version}-source/bin/windows/imagemagick"/>
61        <delete dir="distributions/Greenstone-${version}-source/bin/windows/ghostscript"/>
62    </target>
63
64    <target name="create-archives">
65        <mkdir dir="products"/>
66        <zip destfile="products/Greenstone-${version}-source.zip" basedir="distributions" includes="Greenstone-${version}-source/**/*"/>
67        <exec dir="distributions" executable="tar">
68            <arg line="-czf ../products/Greenstone-${version}-source.tar.gz Greenstone-${version}-source"/>
69        </exec>
70    </target>
71
72    <target name="create-sourcecode">
73        <!-- create a directory for the sourcecode -->
74        <mkdir dir="distributions/Greenstone-${version}-sourcecode"/>
75
76        <!-- copy the files in -->
77        <exec dir="distributions/Greenstone-${version}-source" executable="cp">
78            <arg value="-r"/>
79
80            <!-- the bulk sourcecode -->
81            <arg value="build-src"/>
82            <arg value="common-src"/>
83            <arg value="runtime-src"/>
84            <arg value="runtime-src"/>
85
86            <!-- unix build files -->
87            <arg value="acconfig.h"/>
88            <arg value="aclocal.m4"/>
89            <arg value="config.sub"/>
90            <arg value="configtest.pl"/>
91            <arg value="configure"/>
92            <arg value="configure.in"/>
93            <arg value="install-sh"/>
94            <arg value="Makefile.in"/>
95            <arg value="micotest.cpp"/>
96            <arg value="config.h.in"/>
97            <arg value="Install.txt"/>
98
99            <!-- windows build files -->
100            <arg value="win32.mak"/>
101            <arg value="win32cfg.h"/>
102            <arg value="makegs2.bat"/>
103
104            <!-- destination -->
105            <arg value="../Greenstone-${version}-sourcecode"/>
106
107        </exec>
108
109        <!-- unzip some windows packages -->
110        <unzip src="distributions/Greenstone-${version}-sourcecode/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/Greenstone-${version}-sourcecode/common-src/indexers/packages/windows/iconv"/>
111        <delete file="distributions/Greenstone-${version}-sourcecode/common-src/indexers/packages/windows/iconv/iconv.zip"/>
112       
113        <unzip src="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/crypt/crypt.zip" dest="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/crypt"/>
114        <delete file="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/crypt/crypt.zip"/>
115       
116        <unzip src="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/expat/expat.zip" dest="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/expat"/>
117        <delete file="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/expat/expat.zip"/>
118       
119        <unzip src="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/stlport/stlport.zip" dest="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/stlport"/>
120        <delete file="distributions/Greenstone-${version}-sourcecode/common-src/packages/windows/stlport/stlport.zip"/>
121
122        <untar src="distributions/Greenstone-${version}-sourcecode/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="distributions/Greenstone-${version}-sourcecode/common-src/packages/sqlite" compression="gzip"/>
123        <delete file="distributions/Greenstone-${version}-sourcecode/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
124
125        <!-- tar it up -->
126        <exec dir="distributions" executable="tar">
127            <arg line="-czf ../products/Greenstone-${version}-sourcecode.tar.gz Greenstone-${version}-sourcecode"/>
128        </exec>
129    </target>
130
131
132</project>
Note: See TracBrowser for help on using the browser.