source: main/trunk/release-kits/kits/sork2/ant-scripts/build.xml@ 28533

Last change on this file since 28533 was 28533, checked in by ak19, 10 years ago

More changes to get the necessary gli subfolders into the source component.

File size: 7.5 KB
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 <!-- IMPORT OTHER ANT SCRIPTS -->
13 <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/>
14 <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/>
15
16 <!-- THE MAIN TARGET -->
17 <target name="sork2" depends="init">
18
19 <!-- store the name of the distribution -->
20 <property name="dist.name" value="Greenstone-${version}-source-distribution"/>
21
22 <!-- create distributions dir -->
23 <mkdir dir="distributions"/>
24
25 <!-- export greenstone2 and gli -->
26 <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone2"/><arg value="distributions/${dist.name}"/></exec>
27 <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/gli"/><arg value="distributions/${dist.name}/gli"/></exec>
28
29 <!-- set version numbers -->
30 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/${dist.name}"/></antcall>
31 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall>
32
33 <!-- insert windows binaries -->
34 <delete dir="distributions/${dist.name}/bin/windows"/>
35 <exec executable="svn">
36 <arg value="export"/>
37 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
38 <arg value="distributions/${dist.name}/bin/windows"/>
39 </exec>
40 <get src="${server.exe.location}" dest="distributions/${dist.name}/bin/windows/server.exe"/>
41 <delete dir="distributions/${dist.name}/bin/windows/imagemagick"/>
42 <delete dir="distributions/${dist.name}/bin/windows/ghostscript"/>
43
44 <!-- insert windows perl -->
45 <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/bin/windows"/>
46
47 <!-- clean up -->
48 <delete file="distributions/${dist.name}/bin/linux/mgquery_old" />
49
50 <!-- create the archives (source code distribution) -->
51 <mkdir dir="products"/>
52 <delete file="products/${dist.name}.zip"/>
53 <zip destfile="products/${dist.name}.zip" basedir="distributions" includes="${dist.name}/**/*"/>
54 <exec dir="distributions" executable="tar">
55 <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/>
56 </exec>
57
58 <!-- CREATE THE SOURCE CODE COMPONENT (SOURCE CODE TOP-UP TO THE BINARY RELEASE) -->
59
60 <!-- create a directory for the sourcecode -->
61 <mkdir dir="distributions/source-component"/>
62 <mkdir dir="distributions/source-component/gli"/>
63
64 <!-- copy the files in -->
65 <exec dir="distributions/${dist.name}" executable="cp">
66 <arg value="-r"/>
67
68 <!-- the bulk sourcecode -->
69 <arg value="build-src"/>
70 <arg value="common-src"/>
71 <arg value="runtime-src"/>
72
73 <!-- unix build files -->
74 <arg value="acconfig.h"/>
75 <arg value="aclocal.m4"/>
76 <arg value="config.sub"/>
77 <arg value="config.guess"/>
78 <arg value="configtest.pl"/>
79 <arg value="configure"/>
80 <arg value="configure.in"/>
81 <arg value="install-sh"/>
82 <arg value="Makefile.in"/>
83 <arg value="micotest.cpp"/>
84 <arg value="config.h.in"/>
85 <arg value="Install.txt"/>
86 <arg value="makegs2.sh"/>
87
88 <!-- windows build files -->
89 <arg value="win32.mak"/>
90 <arg value="win32cfg.h"/>
91 <arg value="makegs2.bat"/>
92 <arg value="makegs2x64.bat"/>
93
94 <!-- destination -->
95 <arg value="../source-component"/>
96 </exec>
97
98 <!-- also copy in the gli src and jar folders into the src component -->
99 <exec dir="distributions/${dist.name}" executable="cp">
100 <arg value="-r"/>
101
102 <arg value="gli/src"/>
103 <arg value="gli/classes/images"/>
104 <arg value="gli/classes/META-INF"/>
105
106 <!-- destination -->
107 <arg value="../source-component/gli"/>
108 </exec>
109
110 <patternset id="source.patternset">
111 <include name="build-src"/>
112 <include name="build-src/**/*"/>
113 <include name="common-src"/>
114 <include name="common-src/**/*"/>
115 <include name="runtime-src"/>
116 <include name="runtime-src/**/*"/>
117 <include name="gli/src"/>
118 <include name="gli/src/**/*"/>
119 <include name="gli/classes/META-INF"/>
120 <include name="gli/classes/META-INF/**/*"/>
121 <include name="gli/classes/images"/>
122 <include name="gli/classes/images/**/*"/>
123
124 <!-- unix build files -->
125 <include name="acconfig.h"/>
126 <include name="aclocal.m4"/>
127 <include name="config.sub"/>
128 <include name="config.guess"/>
129 <include name="configtest.pl"/>
130 <include name="configure"/>
131 <include name="configure.in"/>
132 <include name="install-sh"/>
133 <include name="Makefile.in"/>
134 <include name="micotest.cpp"/>
135 <include name="config.h.in"/>
136 <include name="Install.txt"/>
137 <include name="makegs2.sh"/>
138
139 <!-- windows build files -->
140 <include name="win32.mak"/>
141 <include name="win32cfg.h"/>
142 <include name="makegs2.bat"/>
143 <include name="makegs2x64.bat"/>
144 </patternset>
145
146 <mkdir dir="distributions/source-component/uninstall"/>
147 <pstf dir="distributions/source-component" outfile="distributions/source-component/uninstall/source.uninstall" toplevelonly="true">
148 <patternset refid="source.patternset"/>
149 </pstf>
150
151 <!-- unzip some windows packages -->
152 <unzip src="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/source-component/common-src/indexers/packages/windows/iconv"/>
153 <delete file="distributions/source-component/common-src/indexers/packages/windows/iconv/iconv.zip"/>
154
155 <unzip src="distributions/source-component/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/common-src/packages/windows/crypt"/>
156 <delete file="distributions/source-component/common-src/packages/windows/crypt/crypt.zip"/>
157
158 <if><bool><and>
159 <not><equals arg1="${branch.path}" arg2="trunk"/></not>
160 <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
161 <islessthan arg1="${branch.tag.version}" arg2="2.84"/>
162 </and></bool>
163 <unzip src="distributions/source-component/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/common-src/packages/windows/expat"/>
164 <delete file="distributions/source-component/common-src/packages/windows/expat/expat.zip"/>
165 </if>
166
167 <unzip src="distributions/source-component/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/common-src/packages/windows/stlport"/>
168 <delete file="distributions/source-component/common-src/packages/windows/stlport/stlport.zip"/>
169
170 <exec executable="tar" dir="distributions/source-component/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-autoconf-3070602.tar.gz"/></exec>
171 <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-autoconf-3070602.tar.gz"/>
172
173 <exec executable="tar" dir="distributions/source-component/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec>
174 <delete file="distributions/source-component/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
175
176 <!-- archive it -->
177 <delete file="products/Greenstone-${version}-source-component.zip"/>
178 <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/>
179 <exec dir="distributions/source-component" executable="bash">
180 <arg value="-c"/>
181 <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/>
182 </exec>
183
184 </target>
185
186 <target name="properties" depends="core-properties,gs2-properties"/>
187
188</project>
Note: See TracBrowser for help on using the repository browser.