source: greenstone3/trunk/build.xml@ 15048

Last change on this file since 15048 was 15048, checked in by oranfry, 16 years ago

changed all 'gets' from the repo to 'svn export's and introduced a branch.revision property which specifies the revision or the repository to get code from

File size: 66.4 KB
RevLine 
[14732]1<?xml version="1.0"?>
2
3<!-- ======================================================================
4 March 2005
5
6 Greenstone3 build and install script
7
8 kjdon
9 ====================================================================== -->
10<project name="greenstone3" default="usage" basedir=".">
11
12 <!-- ============ classpath =================== -->
13 <path id="project.classpath">
14 <fileset dir="lib/java">
15 <include name="**/*.jar"/>
16 </fileset>
17 </path>
18
19 <!-- ============ self defined tasks =================== -->
20
21 <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/>
22 <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/>
[15028]23 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
24 <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/>
25
[14732]26<!-- ===================== Property Definitions =========================== -->
27
28<!--
29
30 Each of the following properties are used in the build script.
31 Values for these properties are set by the first place they are
32 defined, from the following list:
33
34 * Definitions on the "ant" command line (ant -Dfoo=bar compile).
35
36 * Definitions from a "build.properties" file in the top level
37 source directory of this application.
38
39 * Definitions from a "build.properties" file in the user's
40 home directory.
41
42 * Default definitions in this build.xml file.
43
44 You will note below that property values can be composed based on the
45 contents of previously defined properties. This is a powerful technique
46 that helps you minimize the number of changes required when your development
47 environment is modified. Note that property composition is allowed within
48 "build.properties" files as well as in the "build.xml" script.
49
50-->
[15042]51
52 <!--the first two properties have to be put on the top to be used by build.properties-->
53 <property name="src.packages.home" value="${basedir}/src/packages"/>
54 <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/>
[14732]55 <property file="build.properties"/>
56 <property file="${user.home}/build.properties"/>
57
58 <!-- get properties from the environment -->
59 <property environment="env"/>
60 <property name="build.home" value="${basedir}/build"/>
61 <property name="src.home" value="${basedir}/src/java"/>
62 <property name="packages.home" value="${basedir}/packages"/>
63 <!-- this may be set in build.properties, eg if you move the web dir to
64 tomcats webapps directory -->
65 <property name="web.home" value="${basedir}/web"/>
66 <!-- jar files needed by applets go here -->
67 <property name="web.applet" value="${web.home}/applet"/>
68 <!-- jar files needed by the servlet (and extra ones) go here -->
69 <property name="web.lib" value="${web.home}/WEB-INF/lib"/>
70 <!-- other files needed by the servlet go here -->
71 <property name="web.classes" value="${web.home}/WEB-INF/classes"/>
72 <!-- jni libraries and java wrappers go here -->
73 <property name="lib.jni" value="${basedir}/lib/jni"/>
74
75 <property name="javadocs" value="${basedir}/docs/javadoc"/>
76
77 <property name="app.name" value="greenstone3"/>
78 <property name="app.path" value="/${app.name}"/>
[14798]79
80
[15048]81 <!-- defaults - set these on the command line or in build.properties or they will take these default values-->
82 <property name="app.version" value="trunk"/>
83 <property name="branch.path" value="trunk"/>
84 <property name="branch.revision" value="HEAD"/>
[14798]85
[15048]86 <!--constants -->
[14732]87 <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/>
[15048]88 <property name="svn.root" value="http://svn.greenstone.org"/>
[14732]89
[15048]90 <!-- <property name="cvs.root" value=":pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src"/> -->
[14732]91 <!-- catalina home is set to tomcat basedir is already installed, otherwise
92 use greenstone's tomcat -->
93 <condition property="catalina.home" value="${tomcat.installed.path}">
94 <and>
95 <isset property="tomcat.installed.path"/>
96 <not>
97 <equals arg1="" arg2="${tomcat.installed.path}"/>
98 </not>
99 </and>
100 </condition>
101 <property name="catalina.home" value="${packages.home}/tomcat"/>
102
103 <property name="os.linux" value="Linux"/>
104 <property name="os.mac" value="Mac OS X"/>
105 <property name="os.solaris" value="SunOS"/>
106 <property name="os.unix" value="${os.linux},${os.mac},${os.solaris}"/>
107 <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
108
109 <!-- this is true for linux and macs -->
110 <condition property="current.os.isunix">
111 <os family="unix"/>
112 </condition>
113
114 <condition property="current.os.isunixnotmac">
115 <and>
116 <os family="unix"/>
117 <not>
118 <os family="mac"/>
119 </not>
120 </and>
121 </condition>
122 <condition property="current.os.ismac">
123 <os family="mac"/>
124 </condition>
125
126 <condition property="current.os.iswindows">
127 <os family="windows"/>
128 </condition>
129
130 <condition property="collection.building.enabled">
131 <not>
132 <isset property="disable.collection.building"/>
133 </not>
134 </condition>
135
136 <condition property="collection.building.enabled.windows">
137 <and>
138 <isset property="collection.building.enabled"/>
139 <isset property="current.os.iswindows"/>
140 </and>
141 </condition>
142
143 <condition property="collection.building.enabled.unix">
144 <and>
145 <isset property="collection.building.enabled"/>
146 <isset property="current.os.isunix"/>
147 </and>
148 </condition>
149
150 <condition property="independent-indexers">
151 <isset property="disable.collection.building"/>
152 </condition>
153
154 <!-- ============= Base dirs for each package and component ============ -->
155 <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/>
156 <property name="src.gsdl3.home" value="${src.home}/org/greenstone/gsdl3"/>
157 <property name="anttasks.home" value="${src.home}/org/greenstone/anttasks"/>
158 <property name="gs2build.home" value="${basedir}/gs2build"/>
159 <property name="gli.home" value="${basedir}/gli"/>
160 <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/>
[15042]161
[14732]162 <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">-->
163 <condition property="indexers.home" value="${basedir}/src/packages/indexers">
164 <isset property="disable.collection.building"/>
165 </condition>
166 <condition property="indexers.home" value="${gs2build.home}/indexers">
167 <not>
168 <isset property="disable.collection.building"/>
169 </not>
170 </condition>
171
172 <property name="mg.home" value="${indexers.home}/mg"/>
173 <property name="mgpp.home" value="${indexers.home}/mgpp"/>
174 <property name="lucene.home" value="${indexers.home}/lucene-gs"/>
175
176
177<!-- ==================== Compilation Control Options ==================== -->
178
179<!--
180
181 These properties control option settings on the Javac compiler when it
182 is invoked using the <javac> task.
183
184 compile.debug Should compilation include the debug option?
185
186 compile.deprecation Should compilation include the deprecation option?
187
188 compile.optimize Should compilation include the optimize option?
189
190-->
191
192 <property name="compile.debug" value="true"/>
193 <property name="compile.deprecation" value="true"/>
194 <property name="compile.optimize" value="true"/>
195
196<!--
197
198 Rather than relying on the CLASSPATH environment variable, Ant includes
199 features that makes it easy to dynamically construct the classpath you
200 need for each compilation. The example below constructs the compile
201 classpath to include the servlet.jar file, as well as the other components
202 that Tomcat makes available to web applications automatically, plus anything
203 that you explicitly added.
204
205-->
206
207 <path id="compile.classpath">
208 <!-- Include all jar files and libraries in our jni lib directory -->
209 <pathelement location="${lib.jni}"/>
210 <fileset dir="${lib.jni}">
211 <include name="*.jar"/>
212 </fileset>
213 <!-- Include all jar files in our web lib directory -->
214 <pathelement location="${web.lib}"/>
215 <fileset dir="${web.lib}">
216 <include name="*.jar"/>
217 </fileset>
218
219 <!-- Include the axis jar files -->
220 <!--<fileset dir="${basedir}/comms/soap/axis/lib">
221 <include name="*.jar"/>
222 </fileset>-->
223
224 <!-- include the jar files from the source packages -->
225 <!-- mg and mgpp get installed into lib/jni but they may not be there yet
226 so we add them in by name -->
227 <pathelement location="${lib.jni}/mg.jar"/>
228 <pathelement location="${lib.jni}/mgpp.jar"/>
229
230 <!-- Include all elements that Tomcat exposes to applications -->
231 <pathelement location="${catalina.home}/common/classes"/>
232 <fileset dir="${catalina.home}/common/endorsed">
233 <include name="*.jar"/>
234 </fileset>
235 <fileset dir="${catalina.home}/common/lib">
236 <include name="*.jar"/>
237 </fileset>
238 <pathelement location="${catalina.home}/shared/classes"/>
239 <fileset dir="${catalina.home}/shared/lib">
240 <include name="*.jar"/>
241 </fileset>
242 </path>
243
244 <path id="local.tomcat.classpath">
245 <!-- explicitly include the jni java wrappers in the classpath -->
246 <pathelement location="${lib.jni}"/>
247 <fileset dir="${lib.jni}">
248 <include name="*.jar"/>
249 </fileset>
250 </path>
251
252 <path id="local.tomcat.path">
253 <pathelement location="${basedir}/bin/script"/>
254 <pathelement location="${basedir}/bin"/>
255 <pathelement location="${lib.jni}"/>
256 <pathelement path="${env.PATH}"/>
257 <pathelement path="${env.Path}"/>
258 </path>
259
260 <target name="test-setup">
261 <echo>ant java version=${ant.java.version}</echo>
262 <echo>is unix : ${current.os.isunix}</echo>
263 <echo>is mac : ${current.os.ismac}</echo>
264 <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
265 <echo>is windows : ${current.os.iswindows}</echo>
266 <echo>os.unix: ${os.unix}</echo>
267 </target>
268<!-- ==================== Primary and Global Targets ============================= -->
269
270 <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
271
[15044]272 <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm, prepare-flax"
[14732]273 description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this.">
274<!-- <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections"
275 description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this.">-->
276
277 <!-- make sure .sh files are executable -->
278 <chmod dir="${basedir}" perm="ugo+rx"
279 includes="*.sh"/>
280 <chmod dir="${basedir}/bin/script" perm="ugo+rx"
281 includes="*.sh,*.pl"/>
282 </target>
283 <target name="install" depends="init,install-indexer-files,configure,configure-c++,compile"
284 description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
285
286<!-- <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
287 description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>-->
288 <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web"
289 description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/>
290
291
292 <target name="configure-c++" depends="init,configure-packages,configure-core,configure-gs2building"
293 description="Configure any C/C+/+ package code and gs2building code if necessary"/>
294
295 <target name="configure" depends="init,configure-tomcat,configure-web"
296 description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/>
297
[15038]298 <target name="clean" depends="init,clean-gdbm,clean-packages,clean-core,clean-gs2building"
[14732]299 description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/>
300
301 <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building"
302 description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/>
303
304 <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"
305 description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/>
306
307 <target name="start" depends="init,start-tomcat"
[14798]308 description="Startup the Tomcat server." >
309 <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>
310 <echo>Tomcat: ${catalina.home}</echo>
[14809]311 <echo>Java: ${java.home}</echo>
[14814]312 <echo>URL: http://${tomcat.server}:${tomcat.port}${app.path}/</echo>
313 <!-- assuming that index.html is not needed here -->
[14798]314 </target>
[14732]315
316 <target name="stop" depends="init,stop-tomcat"
317 description="Shutdown the Tomcat server."/>
318
319 <target name="restart" description="Shutdown and restart Tomcat" depends="init,stop,start"/>
320
321
322<!-- =========== Help targets =================================== -->
323
324 <property name="install-command" value="ant [options] prepare install"/>
325
326 <target name="usage" description="Print a help message">
327 <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
328 <echo message=" Execute 'ant -help' for Ant help."/>
329 <echo>To install Greenstone3, run '${install-command}'.
330There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option.
331To log the output, use the '-logfile build.log' option.
332The README.txt file has more information about the ant targets and install process.
333 </echo>
334 </target>
335
336 <target name="help" depends="usage" description="Print a help message"/>
337
338 <target name="debug" depends="init" description="Display all the currently used properties">
339 <echoproperties/>
340 </target>
341
342<!-- ====== initialization and setup targets ================== -->
343
344 <target name="accept-properties" unless="properties.accepted">
345 <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory:
346tomcat.server=${tomcat.server}
347tomcat.port=${tomcat.port}
348tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed)
349proxy.host=${proxy.host}
350proxy.port=${proxy.port}
351If these are not acceptable, please change them and rerun this target. Continue [y/n]? />
352 </input>
353 <condition property="do.abort">
354 <equals arg1="n" arg2="${properties.ok}"/>
355 </condition>
356 <fail if="do.abort">Build aborted by user. Please change your properties settings and re-run the target</fail>
357 </target>
358
359<!-- <target name="check-cvsroot">
360 <condition property="svnroot.notset">
361 <or>
362 <not>
363 <isset property="env.CVSROOT"/>
364 </not>
365 <equals arg1="" arg2="${env.CVSROOT}"/>
366 </or>
367 </condition>
368 <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
369 </target> -->
370
371 <!-- this sets up some initial properties -->
372 <target name="init">
373
374 <condition property="java.too.old">
375 <or>
376 <equals arg1="1.1" arg2="${ant.java.version}"/>
377 <equals arg1="1.2" arg2="${ant.java.version}"/>
378 <equals arg1="1.3" arg2="${ant.java.version}"/>
379 </or>
380 </condition>
381 <fail if="java.too.old" message="You need Java 1.4 or greater to run Greenstone 3"/>
382
383 <available file="${indexers.home}" property="indexers.present"/>
384 <available file="${basedir}/gli" property="gli.present"/>
385 <available file="${basedir}/gs2build" property="gs2build.present"/>
386
387 <condition property="tomcat.islocal">
388 <or>
389 <not>
390 <isset property="tomcat.installed.path"/>
391 </not>
392 <equals arg1="" arg2="${tomcat.installed.path}"/>
393 </or>
394 </condition>
395
[14809]396 <echo>tomcat.port = ${tomcat.port}</echo>
397 <echo>gli.present = ${gli.present}</echo>
398 <echo>gs2build.present = ${gs2build.present}</echo>
399 <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo>
400 <!-- gsdl2.installed.path appears not to be set? -->
401
[14732]402 <condition property="proxy.present">
403 <and>
404 <isset property="proxy.host"/>
405 <not>
406 <equals arg1="" arg2="${proxy.host}"/>
407 </not>
408 </and>
409 </condition>
410
411 <condition property="need.macos.extra">
412 <and>
413 <isset property="current.os.ismac"/>
414 <not>
415 <isset property="disable.collection.building"/>
416 </not>
417 </and>
418 </condition>
419 </target>
420
421 <target name="setup-proxy" depends="init" if="proxy.present">
422 <condition property="ask.user">
423 <or>
424 <equals arg1="" arg2="${proxy.user}"/>
425 <equals arg1="" arg2="${proxy.password}"/>
426 </or>
427 </condition>
428 <getuserandpassword message="Using proxy: ${proxy.host}:${proxy.port}" if="ask.user" username="${proxy.user}" userproperty="proxy.username" pwordproperty="proxy.password"/>
429 <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
430 </target>
431
432 <!-- ========== Web app Targets ================================ -->
433
434 <target name="prepare-web" depends="init,configure-java-version">
435 <mkdir dir="${web.home}/applet"/>
436 <mkdir dir="${web.home}/logs"/>
437 </target>
438
439 <!-- if we are using java 1.5, we need the xalan.jar file in web/WEB-INF/lib, but if we are using java 1.4, we can't have it there -->
440 <target name="configure-java-version" depends="init"
441 description="Run this target if you have changed the default version of java since installing greenstone3">
442 <condition property="need.xalan.jar">
443 <equals arg1="1.5" arg2="${ant.java.version}"/>
444 </condition>
445 <antcall target="activate-xalan-jar"/>
446 <antcall target="deactivate-xalan-jar"/>
447 </target>
448
449 <target name="activate-xalan-jar" if="need.xalan.jar">
450 <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/>
[15035]451 <antcall target="copy-xalan-for-mac" />
[14732]452 </target>
[15035]453
454 <target name="copy-xalan-for-mac" if="current.os.ismac">
[15042]455 <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>
[15035]456 </target>
457
[14732]458 <target name="deactivate-xalan-jar" unless="need.xalan.jar">
459 <delete file="${web.lib}/xalan.jar"/>
460 </target>
461
462 <target name="prepare-collections" depends="init">
463 <property name="collect.dir" value="${web.home}/sites/localsite/collect"/>
464 <!-- gs2mgdemo -->
465 <unzip src="${collect.dir}/gs2mgdemo/import.zip"
466 dest="${collect.dir}/gs2mgdemo"/>
467 <unzip src="${collect.dir}/gs2mgdemo/metadata.zip"
468 dest="${collect.dir}/gs2mgdemo"/>
469 <unzip src="${collect.dir}/gs2mgdemo/index/index.zip"
470 dest="${collect.dir}/gs2mgdemo/index"/>
471 <delete file="${collect.dir}/gs2mgdemo/import.zip"/>
472 <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/>
473 <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/>
474 <!-- gs2mgppdemo -->
475 <unzip src="${collect.dir}/gs2mgppdemo/import.zip"
476 dest="${collect.dir}/gs2mgppdemo"/>
477 <unzip src="${collect.dir}/gs2mgppdemo/metadata.zip"
478 dest="${collect.dir}/gs2mgppdemo"/>
479 <unzip src="${collect.dir}/gs2mgppdemo/index/index.zip"
480 dest="${collect.dir}/gs2mgppdemo/index"/>
481 <delete file="${collect.dir}/gs2mgppdemo/import.zip"/>
482 <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/>
483 <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/>
484 <!-- gberg -->
485 <unzip src="${collect.dir}/gberg/index/index.zip"
486 dest="${collect.dir}/gberg/index"/>
487 <delete file="${collect.dir}/gberg/index/index.zip"/>
488 </target>
489
490
491 <target name="configure-web" depends="init"
492 description="Configure only the web app config files">
493 <!-- we want a unix path in the global.properties file -->
494 <pathconvert targetos="unix" property="src.gsdl3.home.unix">
495 <path path="${web.home}"/>
496 </pathconvert>
497 <filter token="gsdl3home" value="${src.gsdl3.home.unix}"/>
[14798]498 <filter token="gsdl3version" value="${app.version}"/>
[14732]499 <filter token="tomcat.server" value="${tomcat.server}"/>
500 <filter token="tomcat.port" value="${tomcat.port}"/>
501 <copy file="${basedir}/resources/java/global.properties.in" tofile="${web.classes}/global.properties" filtering="true" overwrite="true"/>
502 <copy file="${basedir}/resources/java/log4j.properties.in" tofile="${web.classes}/log4j.properties" filtering="true" overwrite="true"/>
503 <chmod file="${web.classes}/global.properties" perm="600"/>
504 <chmod file="${web.classes}/log4j.properties" perm="600"/>
505 </target>
506
507 <target name="compile-web" depends="init">
508 <javac srcdir="${web.classes}"
509 destdir="${web.classes}"
510 debug="${compile.debug}"
511 deprecation="${compile.deprecation}"
512 optimize="${compile.optimize}">
513 <classpath>
514 <path refid="compile.classpath"/>
515 </classpath>
516 </javac>
517 </target>
518
519 <target name="svnupdate-web" unless="nosvn.mode">
520 <svn>
521 <update dir="${web.home}"/>
522 </svn>
523 </target>
524
525 <target name="update-web" depends="init,svnupdate-web,configure-web"
526 description="update only the web stuff (config files)"/>
527
528
529<!-- ======================= Tomcat Targets ========================== -->
530
531 <!-- this target downloads and installs Tomcat -->
532 <!-- we download tomcat and the compat module - its needed for 1.4, and doesn't seem to harm 1.5 -->
533 <target name="prepare-tomcat" depends="init,setup-proxy" if="tomcat.islocal">
534
535 <!-- check that packages dir is there -->
536 <mkdir dir="${packages.home}"/>
537 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25.zip"
538 dest="${packages.home}/apache-tomcat-5.5.25.zip"
539 usetimestamp="true"/>
540 <unzip src="${packages.home}/apache-tomcat-5.5.25.zip"
541 dest="${packages.home}"/>
542 <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25-compat.zip"
543 dest="${packages.home}/apache-tomcat-5.5.25-compat.zip"
544 usetimestamp="true"/>
545 <unzip src="${packages.home}/apache-tomcat-5.5.25-compat.zip"
546 dest="${packages.home}"/>
547 <!-- delete any existing tomcat -->
548 <delete dir="${packages.home}/tomcat"/>
549 <move todir="${packages.home}/tomcat">
550 <fileset dir="${packages.home}/apache-tomcat-5.5.25"/>
551 </move>
552 <copy file="${basedir}/resources/tomcat/setclasspath.bat"
553 tofile="${packages.home}/tomcat/bin/setclasspath.bat"
554 overwrite="true"/>
555 <copy file="${basedir}/resources/tomcat/setclasspath.sh"
556 tofile="${packages.home}/tomcat/bin/setclasspath.sh"
557 overwrite="true"/>
558 <!-- make sure we have execute permission for the .sh files -->
559 <chmod dir="${packages.home}/tomcat/bin" perm="ugo+rx"
560 includes="*.sh"/>
561 </target>
562
563 <target name="configure-tomcat" depends="init,configure-tomcat-local,configure-tomcat-external"/>
564
565 <target name="configure-tomcat-local" depends="init" if="tomcat.islocal">
566 <!-- re-setup the server.xml file -->
567 <copy file="${basedir}/resources/tomcat/server.xml" tofile="${packages.home}/tomcat/conf/server.xml" overwrite="true">
568 <filterset>
569 <filter token="port" value="${tomcat.port}"/>
570 <filter token="shutdown-port" value="${tomcat.shutdown.port}"/>
571 </filterset>
572 </copy>
573 <!-- set up the greenstone3 context -->
574 <copy file="${basedir}/resources/tomcat/greenstone3.xml" tofile="${packages.home}/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true">
575 <filterset>
576 <filter token="gsdl3webhome" value="${basedir}/web"/>
577 </filterset>
578 </copy>
579 </target>
580
581 <target name="configure-tomcat-external" depends="init" unless="tomcat.islocal">
582 <!-- re-setup the server.xml file -->
583 <!-- need to edit the config file, or do we get the user to do this???-->
584 </target>
585
586 <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal">
587 <property name="tomcat.classpath" refid="local.tomcat.classpath"/>
588 <property name="tomcat.path" refid="local.tomcat.path"/>
589 <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
590 <exec executable="${catalina.home}/bin/startup.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
591 <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
592 <env key="GSDL3HOME" value="${basedir}"/>
593 <env key="PATH" path="${tomcat.path}"/>
594 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
595 <env key="CATALINA_HOME" value="${catalina.home}"/>
596 <env key="CLASSPATH" path="${tomcat.classpath}"/>
597 <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/>
598 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${gdbm.installed.path}/lib"/> <!-- for mac os -->
599 </exec>
600 <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
601 <env key="GSDLOS" value="windows"/>
602 <env key="GSDL3HOME" value="${basedir}"/>
603 <env key="Path" path="${tomcat.path}"/>
604 <env key="PATH" path="${tomcat.path}"/>
605 <env key="CATALINA_OPTS" value="${catalina.opts}"/>
606 <env key="CLASSPATH" path="${tomcat.classpath}"/>
607 </exec>
608 <!-- wait for the server to startup in case other targets need it running -->
609 <waitfor maxwait="5" maxwaitunit="second">
610 <and>
611 <socket server="${tomcat.server}" port="${tomcat.port}"/>
612 <http url="http://${tomcat.server}:${tomcat.port}${app.path}/index.html"/>
613 </and>
614 </waitfor>
615 </target>
[14798]616
[14732]617 <!-- windows: do we want to launch a webrowser?? -->
[14815]618 <!-- shouldn't this test whether anything is running first? -->
[14732]619 <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
620 <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
621 <env key="CATALINA_HOME" value="${catalina.home}"/>
622 </exec>
623 <exec executable="${catalina.home}/bin/shutdown.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="false"/>
624 </target>
625
626 <target name="restart-tomcat" description="Shutdown and restart only Tomcat" depends="init,stop-tomcat,start-tomcat"/>
627
628 <target name="setup-catalina-ant-tasks">
629 <!-- Configure the custom Ant tasks for the Tomcat Manager application -->
630 <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
631 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
632 <taskdef name="list" classname="org.apache.catalina.ant.ListTask"
633 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
634 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"
635 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
636 <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"
637 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
638 <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"
639 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
640 <taskdef name="start" classname="org.apache.catalina.ant.StartTask"
641 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
642 <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
643 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
644 <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"
645 classpath="${catalina.home}/server/lib/catalina-ant.jar"/>
646 </target>
647
648
649
650
651
652
653<!-- ======================= ant Targets ============================ -->
654 <target name="prepare-ant" depends="init">
655 <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip"
656 dest="${packages.home}/apache-ant-1.7.0-bin.zip"
657 usetimestamp="true"/>
658 <unzip src="${packages.home}/apache-ant-1.7.0-bin.zip"
659 dest="${packages.home}"/>
660 <move todir="${packages.home}/ant">
661 <fileset dir="${packages.home}/apache-ant-1.7.0"/>
662 </move>
663 </target>
664
665<!-- ======================= Axis Targets ============================ -->
666
667 <target name="prepare-axis" depends="init">
668 <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip"
669 dest="${packages.home}/axis-bin-1_2_1.zip"
670 usetimestamp="true"/>
671 <unzip src="${packages.home}/axis-bin-1_2_1.zip"
672 dest="${packages.home}"/>
673 <move todir="${packages.home}/axis">
674 <fileset dir="${packages.home}/axis-1_2_1"/>
675 </move>
676 <!-- install axis into greenstone web app -->
677 <copy todir="${web.lib}">
678 <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/lib">
679 <include name="*.jar"/>
680 </fileset>
681 </copy>
682 <copy todir="${web.home}">
683 <fileset dir="${packages.home}/axis/webapps/axis/">
684 <include name="*.jsp"/>
685 <include name="*.jws"/>
686 </fileset>
687 </copy>
688 <copy tofile="${web.home}/axis.html" file="${packages.home}/axis/webapps/axis/index.html"/>
689 <copy todir="${web.classes}">
690 <fileset dir="${packages.home}/axis/webapps/axis/WEB-INF/classes">
691 <include name="*.properties"/>
692 </fileset>
693 </copy>
694 </target>
695
696 <target name="soap-deploy-site" depends="init,get-sitename,get-siteuri,create-deployment-files,deploy-site"
697 description="Deploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work."/>
698
699 <target name="deploy-site">
700 <java classname="org.apache.axis.client.AdminClient">
701 <classpath refid="compile.classpath"/>
702 <arg value="-l"/>
703 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
704 <arg file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
705 </java>
706 </target>
707
708 <target name="soap-undeploy-site" depends="get-sitename"
709 description="Undeploy a SOAP web service for a local Greenstone site. Tomcat must be running for this to work.">
710 <java classname="org.apache.axis.client.AdminClient">
711 <classpath refid="compile.classpath"/>
712 <arg value="-l"/>
713 <arg value="http://${tomcat.server}:${tomcat.port}${app.path}/servlet/AxisServlet"/>
714 <arg file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
715 </java>
716 </target>
717
718 <!-- this target used to deploy the preprepared localsite server -->
719 <target name="deploy-localsite" depends="init"
720 description="Deploy the SOAP server for localsite. Will start and stop Tomcat.">
721 <antcall target="start-tomcat"/>
722 <antcall target="deploy-site">
723 <param name="axis.sitename" value="localsite"/>
724 </antcall>
725 <antcall target="stop-tomcat"/>
726 </target>
727
728 <target name="get-sitename" unless="axis.sitename">
729 <input addproperty="axis.sitename" message="What site? (press enter for default:localsite)" defaultvalue="localsite"/>
730 </target>
731
732 <target name="get-siteuri" depends="get-sitename" unless="axis.siteuri">
733 <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
734 <echo>${axis.sitename}, ${axis.siteuri}</echo>
735 </target>
736
737 <target name="check-deployment-files" depends="get-sitename">
738 <condition property="deploy.exists">
739 <and>
740 <available file="${basedir}/resources/soap/${axis.sitename}.wsdd"/>
741 <available file="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"/>
742 <available file="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class"/>
743 </and>
744 </condition>
745 </target>
746
747 <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"
748 if="axis.sitename" unless="deploy.exists">
749 <filter token="sitename" value="${axis.sitename}"/>
750 <filter token="siteuri" value="${axis.siteuri}"/>
751 <copy file="${basedir}/resources/soap/site.wsdd.template"
752 tofile="${basedir}/resources/soap/${axis.sitename}.wsdd"
753 filtering="true"/>
754 <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template"
755 tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd"
756 filtering="true"/>
757 <!-- create the java files and compile them -->
758 <copy file="${basedir}/resources/java/SOAPServer.java.in"
759 tofile="${src.gsdl3.home}/SOAPServer${axis.sitename}.java"
760 filtering="true"/>
761 <mkdir dir="${build.home}"/>
762 <javac srcdir="${src.home}"
763 destdir="${build.home}"
764 debug="${compile.debug}"
765 deprecation="${compile.deprecation}"
766 optimize="${compile.optimize}">
767 <classpath refid="compile.classpath"/>
768 <include name="org/greenstone/gsdl3/SOAPServer${axis.sitename}.java" />
769 </javac>
770 <mkdir dir="${web.classes}/org/greenstone/gsdl3"/>
771 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" />
772 </target>
773
774
775<!-- ====================== Core targets ============================== -->
776<!-- core targets refer to the core gsdl3 java src -->
777
778 <target name="prepare-core" unless="nocvs.mode">
779 <!-- just get rid of empty directories-->
780 <svn>
781 <update dir="."/>
782 </svn>
783 </target>
784
785 <target name="configure-core"/>
786
787 <target name="update-core" depends="init,svnupdate-core,clean-core,compile-core"
788 description="Update only the Greenstone core" />
789
790 <target name="svnupdate-core" unless="nocvs.mode">
791
792 <svn>
793 <update dir="." recurse="false"/>
794 </svn>
795
796 <svn>
797 <update dir="bin"/>
798 <update dir="comms"/>
799 <update dir="dist-resources"/>
800 <update dir="docs"/>
801 <update dir="lib"/>
802 <update dir="resources"/>
803 <update dir="src"/>
804 <update dir="winutil"/>
805 </svn>
806
807 </target>
808
809 <target name="clean-core"
810 description="Clean only the Greenstone core">
811 <delete dir="${build.home}"/>
812 </target>
813
814 <target name="compile-core" depends="init"
815 description="Compile only the Greenstone core">
816 <mkdir dir="${build.home}"/>
817 <javac srcdir="${src.home}"
818 destdir="${build.home}"
819 debug="${compile.debug}"
820 deprecation="${compile.deprecation}"
821 optimize="${compile.optimize}">
822 <classpath>
823 <path refid="compile.classpath"/>
824 </classpath>
825 </javac>
826 <jar destfile="${build.home}/gsdl3.jar">
827 <fileset dir="${build.home}">
828 <include name="org/greenstone/gsdl3/**"/>
829 <include name="org/flax/**"/>
830 <exclude name="**/Test.class"/>
831 </fileset>
832 <manifest>
833 <attribute name="Built-By" value="${user.name}" />
834 </manifest>
835 </jar>
836 <copy file="${build.home}/gsdl3.jar" todir="${web.lib}"/>
837 <!-- copy the localsite server in case we need it -->
838 <copy file="${build.home}/org/greenstone/gsdl3/SOAPServerlocalsite.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServerlocalsite.class" />
839
840 <jar destfile="${build.home}/GAI.jar">
841 <fileset dir="${build.home}">
842 <include name="org/greenstone/admin/**"/>
843 </fileset>
844 <manifest>
845 <attribute name="Built-By" value="${user.name}" />
846 </manifest>
847 </jar>
848
849 <jar destfile="${build.home}/phind.jar">
850 <fileset dir="${build.home}">
851 <include name="org/greenstone/applet/phind/**"/>
852 </fileset>
853 <manifest>
854 <attribute name="Built-By" value="${user.name}" />
855 </manifest>
856 </jar>
857 <mkdir dir="${web.applet}"/>
858 <copy file="${build.home}/phind.jar" todir="${web.applet}"/>
859 <!-- phind also needs xercesImpl.jar and xml-apis.jar to be in web/applet -->
860 <copy file="${packages.home}/tomcat/common/endorsed/xercesImpl.jar" todir="${web.applet}"/>
861 <copy file="${packages.home}/tomcat/common/endorsed/xml-apis.jar" todir="${web.applet}"/>
862 <jar destfile="${build.home}/anttasks.jar">
863 <fileset dir="${build.home}">
864 <include name="org/greenstone/anttasks/**"/>
865 </fileset>
866 <manifest>
867 <attribute name="Built-By" value="${user.name}" />
868 </manifest>
869 </jar>
870 <copy file="${build.home}/anttasks.jar" todir="${basedir}/lib/java"/>
871 <jar destfile="${build.home}/gsdl3test.jar">
872 <fileset dir="${build.home}">
873 <include name="org/greenstone/gsdl3/**/*Test.class"/>
874 <include name="org/greenstone/testing/**"/>
875 </fileset>
876 <manifest>
877 <attribute name="Built-By" value="${user.name}" />
878 </manifest>
879 </jar>
880 <jar destfile="${build.home}/server.jar">
881 <fileset dir="${build.home}">
882 <include name="org/greenstone/server/**"/>
883 </fileset>
884 <fileset file="${basedir}/resources/java/server.properties"/>
885 <manifest>
886 <attribute name="Built-By" value="${user.name}"/>
887 </manifest>
888 </jar>
889 <copy file="${build.home}/server.jar" todir="${basedir}"/>
890 </target>
891
892<!-- ================== Packages targets ================================ -->
893 <!-- these targets refer to the greenstone source packages - these need
894 updating less often, so are in separate targets to the core -->
895 <target name="prepare-packages" depends="init,prepare-indexers"/>
896
897 <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nocvs.mode">
898<!-- <target name="checkout-indexers" depends="check-svnroot,init" if="independent-indexers" unless="nocvs.mode"> -->
899 <svn>
[15048]900 <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers" revision="${branch.revision}"/>
[14732]901 </svn>
902 </target>
903
904 <target name="prepare-indexers" depends="init" if="independent-indexers" unless="indexers.present">
905 <antcall target="checkout-indexers"/>
906 </target>
907
908 <target name="update-packages" depends="init,svnupdate-packages,configure-packages,clean-packages,compile-packages"
909 description="Update only the source packages"/>
910
911 <target name="svnupdate-packages" unless="nocvs.mode">
912 <svn>
913 <update dir="${src.packages.home}"/>
914 </svn>
915 </target>
916
[15042]917 <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"
[14732]918 description="Configure only the packages."/>
919
920 <target name="configure-javagdbm">
921 <echo>
922 Configuring JavaGDBM
923 </echo>
924 <exec executable="${javagdbm.home}/configure" os="${os.linux},${os.solaris}"
925 dir="${javagdbm.home}">
926 <arg value="--prefix=${basedir}"/>
927 <arg value="--libdir=${lib.jni}"/>
928 </exec>
929 <exec executable="${javagdbm.home}/configure" os="${os.mac}"
930 dir="${javagdbm.home}">
931 <arg value="--prefix=${basedir}"/>
932 <arg value="--libdir=${lib.jni}"/>
933 <arg value="--with-gdbm=${gdbm.installed.path}"/>
934 </exec>
935 </target>
936
937<!-- Message from oran. I removed the condition from this line becuase it meant
938 the indexers would only be configured if collection building was DISabled.
939 Shouldn't they be configured when collection building is ENabled? -->
940
941<!-- <target name="configure-indexers" depends="init" if="independent-indexers"> -->
942<target name="configure-indexers" depends="init">
943 <echo>Configuring Indexers</echo>
944 <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}">
945 <arg value="--prefix=${basedir}"/>
946 <arg value="--libdir=${lib.jni}"/>
947 </exec>
948 </target>
949
950 <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/>
951
952 <target name="clean-javagdbm" depends="init">
953 <exec executable="make" os="${os.unix}"
954 dir="${javagdbm.home}">
955 <arg value="clean"/>
956 </exec>
957 </target>
958
959 <target name="clean-indexers" depends="init" if="independent-indexers">
960 <exec executable="make" os="${os.unix}"
961 dir="${indexers.home}">
962 <arg value="clean"/>
963 </exec>
964 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}"
965 dir="${indexers.home}">
966 <arg value="clean"/>
967 </exec>
968
969 </target>
970
971 <target name="compile-packages" description="Compile only the source packages">
[15038]972
[14732]973 <!-- javagdbm -->
974 <echo>compile javagdbm</echo>
975 <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/>
976 <exec executable="make" os="${os.unix}" dir="${javagdbm.home}">
977 <arg value="install"/>
978 </exec>
979
980 <!-- windows: just the java stuff. -->
981 <echo>Windows: compile javagdbm (java only)</echo>
982 <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}">
983 <arg value="compile"/>
984 <arg value="javaonly"/>
985 </exec>
986
987 <!-- install the jar file -->
988 <echo>Install the javagdbm jar file</echo>
989 <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
990
991 <!-- Indexers -->
992
993 <!-- this may be in gs2build - we will be recompiling, but never mind -->
994 <echo>Indexers: make (from ${indexers.home})</echo>
995 <exec executable="make" os="${os.unix}" dir="${indexers.home}"/>
996 <echo>Indexers: make install</echo>
997 <exec executable="make" os="${os.unix}" dir="${indexers.home}">
998 <arg value="install"/>
999 </exec>
1000
1001 <echo>Indexers: make</echo>
1002 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
1003 <arg value="all"/>
1004 </exec>
1005 <echo>Indexers: make install</echo>
1006 <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}">
1007 <arg value="install"/>
1008 </exec>
1009
1010 <!-- install the jar and jni files -->
1011 <echo>Install the indexers' jar and jni files</echo>
1012 <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
1013 <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
1014 <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
1015 <antcall target="install-jni-files"/>
1016 </target>
1017
1018 <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/>
1019
1020 <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac">
1021 <copy file="${mg.home}/jni/libmgretrievejni.so" todir="${lib.jni}"/>
1022 <copy file="${mg.home}/jni/libmgsearchjni.so" todir="${lib.jni}"/>
1023 <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/>
1024 <copy file="${mgpp.home}/jni/libmgppretrievejni.so" todir="${lib.jni}"/>
1025 <copy file="${mgpp.home}/jni/libmgppsearchjni.so" todir="${lib.jni}"/>
1026 <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/>
1027 </target>
1028 <target name="install-jni-files-windows" depends="init" if="current.os.iswindows">
1029 <copy file="${mg.home}/jni/mgretrievejni.dll" todir="${lib.jni}"/>
1030 <copy file="${mg.home}/jni/mgsearchjni.dll" todir="${lib.jni}"/>
1031 <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/>
1032 <copy file="${mgpp.home}/jni/mgppretrievejni.dll" todir="${lib.jni}"/>
1033 <copy file="${mgpp.home}/jni/mgppsearchjni.dll" todir="${lib.jni}"/>
1034 <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/>
1035 </target>
1036 <target name="install-jni-files-macos" depends="init" if="current.os.ismac">
1037 <copy file="${mg.home}/jni/libmgretrievejni.jnilib" todir="${lib.jni}"/>
1038 <copy file="${mg.home}/jni/libmgsearchjni.jnilib" todir="${lib.jni}"/>
1039 <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/>
1040 <copy file="${mgpp.home}/jni/libmgppretrievejni.jnilib" todir="${lib.jni}"/>
1041 <copy file="${mgpp.home}/jni/libmgppsearchjni.jnilib" todir="${lib.jni}"/>
1042 <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/>
1043 </target>
1044
1045 <!-- ================== gs2building targets ===============-->
1046
1047
1048 <target name="update-gs2building" if="collection.building.enabled"
1049 depends="init,svnupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
1050 description="Update only the Greenstone 2 building components"/>
1051
1052 <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nocvs.mode">
1053 </target>
1054 <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nocvs.mode">
1055 <!-- Note: can't do a -d update here cos it will get all of gsdl
1056 also, an update doesn't get new files, so we do a checkout instead. -->
1057 <antcall target="checkout-gs2build"/>
1058 </target>
1059
1060 <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nocvs.mode">
1061 <svn>
1062 <update dir="${gli.home}"/>
1063 </svn>
1064 </target>
1065
1066 <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="collection.building.enabled">
1067 </target>
1068
1069 <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nocvs.mode">
1070 <echo>checking out gs2build</echo>
1071 <!-- svn checkouts -->
1072 <svn>
1073 <!-- perllib -->
[15048]1074 <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib" revision="${branch.revision}"/>
[14732]1075
1076 <!-- selected packages -->
[15048]1077 <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan" revision="${branch.revision}" />
1078 <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat" revision="${branch.revision}" />
1079 <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy" revision="${branch.revision}" />
1080 <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl" revision="${branch.revision}" />
1081 <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea" revision="${branch.revision}" />
1082 <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml" revision="${branch.revision}" />
1083 <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml" revision="${branch.revision}" />
1084 <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir" revision="${branch.revision}" />
1085 <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget" revision="${branch.revision}" />
1086 <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows" revision="${branch.revision}" />
1087 <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv" revision="${branch.revision}" />
1088 <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml" revision="${branch.revision}" />
1089 <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz" revision="${branch.revision}" />
[14732]1090
1091 <!-- some of src (db2txt hashfile phind txt2db) -->
[15048]1092 <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt" revision="${branch.revision}" />
1093 <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile" revision="${branch.revision}" />
1094 <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind" revision="${branch.revision}" />
1095 <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db" revision="${branch.revision}" />
[14732]1096
1097 <!-- bin -->
[15048]1098 <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script" revision="${branch.revision}" />
[14732]1099
1100 <!-- mappings -->
[15048]1101 <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings" revision="${branch.revision}"/>
[14732]1102
1103 <!-- etc/packages -->
[15048]1104 <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages" revision="${branch.revision}"/>
[14732]1105
1106 <!-- collect -->
[15048]1107 <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol" revision="${branch.revision}"/>
[14732]1108
1109 <!-- gs2build-extra -->
[15048]1110 <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra" revision="${branch.revision}"/>
[14732]1111
1112 <!-- indexers -->
[15048]1113 <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers" revision="${branch.revision}"/>
[14732]1114
[15048]1115 <!-- single files -->
1116
1117 <!-- some files from lib -->
1118 <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.h" destPath="gs2build/lib/text_t.h"/>
1119 <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" destPath="gs2build/lib/text_t.cpp"/>
1120 <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" destPath="gs2build/lib/gsdlconf.h"/>
[14732]1121
[15048]1122 <!-- some files from etc -->
1123 <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt"/>
1124 <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml"/>
1125 <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl"/>
1126 <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml"/>
1127
1128 <!-- some files from the gsdl root directory -->
1129 <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash"/>
1130 <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub"/>
1131 <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess"/>
1132 <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in"/>
1133 <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl"/>
1134 <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh"/>
1135 <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h"/>
1136 <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4"/>
1137 <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h"/>
[14732]1138 </svn>
1139 </target>
1140
1141 <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present">
1142 <antcall target="checkout-gs2build"/>
1143 <antcall target="rename-gs2build-files"/>
1144 <antcall target="unzip-windows-packages"/>
1145 <antcall target="checkout-winbin"/>
1146 <antcall target="get-windows-binaries"/>
1147 <antcall target="delete-winbin"/>
1148 <antcall target="get-macos-extra"/>
1149 </target>
1150
1151 <target name="checkout-winbin" depends="init" if="current.os.iswindows"
1152 unless="nocvs.mode">
1153 <svn>
[15048]1154 <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin" revision="${branch.revision}"/>
[14732]1155 </svn>
[14798]1156 </target>
1157
1158 <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nocvs.mode">
[14732]1159 <svn>
[14995]1160 <update dir="winbin"/>
[14732]1161 </svn>
1162 </target>
1163
1164 <target name="get-windows-binaries" depends="init" if="collection.building.enabled.windows">
1165 <move todir="${gs2build.home}/bin/windows" failonerror="false">
1166 <fileset dir="${basedir}/winbin/bin"/>
1167 </move>
1168 </target>
1169 <target name="delete-winbin" depends="init" if="collection.building.enabled.windows">
1170 <delete dir="${basedir}/winbin"/>
1171 </target>
1172
1173 <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows">
1174 <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
1175 dest="${gs2build.home}/packages/windows/gdbm"/>
1176 <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip"
1177 dest="${gs2build.home}/packages/windows/crypt"/>
1178 <unzip src="${gs2build.home}/packages/windows/expat/expat.zip"
1179 dest="${gs2build.home}/packages/windows/expat"/>
1180 </target>
1181
1182 <!-- downloads a good XML-Parser -->
1183 <target name="get-macos-extra" depends="init" if="need.macos.extra">
1184 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz"
1185 dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1186 usetimestamp="true"/>
1187 </target>
1188
1189 <!-- untars the XML-Parser. need to do this after compiling in gs2build-->
1190 <target name="install-macos-extra" depends="init,get-macos-extra" if="need.macos.extra">
1191 <!-- make sure these directories are present, otherwise chmod craps out
1192 this chmod is needed in case we are unpacking for a second time -->
1193 <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.8"/>
1194 <mkdir dir="${gs2build.home}/perllib/cpan/perl-5.6"/>
1195 <chmod dir="${gs2build.home}/perllib/cpan/perl-5.8" perm="ug+w" includes="**"/>
1196 <chmod dir="${gs2build.home}/perllib/cpan/perl-5.6" perm="ug+w" includes="**"/>
1197 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"
1198 dest="${gs2build.home}/perllib/cpan/"
1199 compression="gzip"/>
1200 </target>
1201
1202 <target name="install-indexer-files" depends="init" unless="indexers.present">
1203 <copy todir="${indexers.home}">
1204 <fileset dir="${gs2build.home}/indexers" />
1205 </copy>
1206 <chmod file="${indexers.home}/configure" perm="a+x"/>
1207 </target>
1208
1209 <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows,gs2build-edit-setup-bat" if="collection.building.enabled"/>
1210
1211 <target name="gs2build-edit-setup-bat" if="collection.building.enabled.windows">
1212 <!-- we want a windows path in the setup.bat file -->
1213 <pathconvert targetos="windows" property="gs2build.home.windows">
1214 <path path="${gs2build.home}"/>
1215 </pathconvert>
1216 <move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/setup-tmp.bat">
1217 <filterset>
1218 <filter token="gsdlhome" value="${gs2build.home.windows}"/>
1219 </filterset>
1220 </move>
1221 <move file="${gs2build.home}/setup-tmp.bat" tofile="${gs2build.home}/setup.bat" />
1222 </target>
1223
1224 <target name="rename-gs2build-files-windows" if="collection.building.enabled.windows">
1225 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1226 <copy file="${gs2build-extra.home}/lib.win32.mak" tofile="${gs2build.home}/lib/win32.mak"/>
1227 <copy file="${gs2build-extra.home}/win32.mak" tofile="${gs2build.home}/win32.mak"/>
1228 <copy file="${gs2build-extra.home}/setup.bat" tofile="${gs2build.home}/setup.bat"/>
1229 </target>
1230
1231 <target name="rename-gs2build-files-unix" if="collection.building.enabled.unix">
1232 <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
1233 <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>
1234 <chmod file="${gs2build.home}/configure" perm="a+x"/>
1235 <copy file="${gs2build-extra.home}/configure.in" tofile="${gs2build.home}/configure.in"/>
1236 <copy file="${gs2build-extra.home}/Makefile.in" tofile="${gs2build.home}/Makefile.in"/>
1237 <copy file="${gs2build-extra.home}/packages.configure" tofile="${gs2build.home}/packages/configure"/>
1238 <chmod file="${gs2build.home}/packages/configure" perm="a+x"/>
1239 <copy file="${gs2build-extra.home}/packages.Makefile.in" tofile="${gs2build.home}/packages/Makefile.in"/>
1240 <copy file="${gs2build-extra.home}/lib.Makefile.in" tofile="${gs2build.home}/lib/Makefile.in"/>
1241 </target>
1242
1243 <target name="prepare-gli" depends="init" if="collection.building.enabled" unless="gli.present">
1244 <antcall target="checkout-gli"/>
1245 </target>
1246
1247<!-- <target name="checkout-gli" depends="check-cvsroot,init" if="collection.building.enabled" unless="nocvs.mode"> -->
1248 <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nocvs.mode">
1249 <echo>checking out gli</echo>
1250 <svn>
[15048]1251 <checkout url="${svn.root}/gli/${branch.path}" destPath="gli" revision="${branch.revision}"/>
[14732]1252 </svn>
1253 </target>
1254
1255 <target name="configure-gs2building" depends="init" if="collection.building.enabled"
1256 description="Configure only the Greenstone 2 building components">
1257 <exec executable="${gs2build.home}/configure" os="${os.linux},${os.solaris}"
1258 dir="${gs2build.home}">
1259 <arg value="--prefix=${gs2build.home}"/>
1260 </exec>
1261 <exec executable="${gs2build.home}/configure" os="${os.mac}"
1262 dir="${gs2build.home}">
1263 <arg value="--prefix=${gs2build.home}"/>
1264 <arg value="--with-gdbm=${gdbm.installed.path}"/>
1265 </exec>
1266 </target>
1267
1268 <target name="clean-gs2building" depends="init,clean-gli,clean-gs2build"
1269 description="Clean only the Greenstone 2 building components"
1270 if="collection.building.enabled"/>
1271
1272 <target name="clean-gli" depends="init" if="collection.building.enabled">
1273 <!-- gli -->
1274 <property name="gli.home" value="${basedir}/gli"/>
1275 <!-- linux -->
1276 <exec executable="clean.sh" os="${os.unix}" dir="${gli.home}"
1277 resolveExecutable="true"/>
1278 <!-- windows -->
1279 <exec executable="clean.bat" os="${os.windows}" dir="${gli.home}"
1280 resolveExecutable="true"/>
1281 </target>
1282
1283 <target name="clean-gs2build" depends="init" if="collection.building.enabled">
1284 <!-- gs2build -->
1285 <!--linux: -->
1286 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1287 <arg value="clean"/>
1288 </exec>
1289 <!-- windows: -->
1290 <!-- run the setup script -->
[15029]1291 <exec executable="${compile.windows.c++.setup}" os="${os.windows}" />
1292 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" >
[14732]1293 <arg value="/f"/>
1294 <arg value="win32.mak"/>
1295 <arg value="clean"/>
1296 </exec>
1297 </target>
1298
1299 <target name="distclean-gs2build" depends="init" if="collection.building.enabled">
1300 <!-- gs2build -->
1301 <!--linux: -->
1302 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1303 <arg value="distclean"/>
1304 </exec>
1305 <!-- windows: -->
1306 </target>
1307
1308 <target name="compile-gs2building" depends="init,compile-gs2build,compile-gli" if="collection.building.enabled"
1309 description="Compile only the Greenstone 2 building components">
1310 </target>
1311
[14798]1312 <target name="compile-gli" depends="init" if="collection.building.enabled">
[14732]1313 <!-- gli -->
[14798]1314 <property name="gli.home" value="${basedir}/gli"/>
1315
1316 <!-- change the version number -->
1317 <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/>
[14732]1318 <!-- linux -->
1319 <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}" resolveExecutable="true"/>
1320 <!--remote gli-->
1321 <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}"
1322 resolveExecutable="true"/>
1323 <!-- windows -->
1324 <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true"/>
1325 <!--remote gli-->
1326 <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}"
1327 resolveExecutable="true"/>
1328 <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" />
1329 </target>
1330
1331 <target name="compile-gs2build" depends="init" if="collection.building.enabled">
1332 <!-- gs2build -->
1333 <!--linux: make, make install -->
1334 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1335 </exec>
1336 <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
1337 <arg value="install"/>
1338 </exec>
1339 <!-- run the setup script -->
1340 <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/>
1341 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
1342 <arg value="/f"/>
1343 <arg value="win32.mak"/>
1344 </exec>
1345 <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}">
1346 <arg value="/f"/>
1347 <arg value="win32.mak"/>
1348 <arg value="install"/>
1349 </exec>
1350 <!-- LuceneWrapper jar file not installed by default -->
1351 <mkdir dir="${gs2build.home}/bin/java"/>
1352 <copy file="${lucene.home}/LuceneWrapper.jar" todir="${gs2build.home}/bin/java"/>
1353 <antcall target="install-gs2build-indexers-windows"/>
1354 <antcall target="install-macos-extra"/>
1355 </target>
1356
1357 <target name="install-gs2build-indexers-windows" depends="init" if="collection.building.enabled.windows">
1358 <copy todir="${gs2build.home}/bin/windows">
1359 <fileset dir="${gs2build.home}/indexers/bin">
1360 <include name="*.*"/>
1361 </fileset>
1362 </copy>
1363 </target>
1364
1365 <target name="gli" description="Run the Greenstone Librarian Interface" depends="init" if="collection.building.enabled">
1366 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux},${os.solaris}" dir="${basedir}/gli" spawn="true">
1367 <env key="gsdl3path" path="${basedir}"/>
1368 <env key="gsdlpath" path="${basedir}/gs2build"/>
1369 </exec>
1370 <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.mac}" dir="${basedir}/gli" spawn="true">
1371 <env key="gsdl3path" path="${basedir}"/>
1372 <env key="gsdlpath" path="${basedir}/gs2build"/>
1373 <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
1374 </exec>
1375 <exec executable="${basedir}/gli/gli4gs3.bat" os="${os.windows}" dir="${basedir}/gli" spawn="true">
1376 <env key="GSDL3PATH" path="${basedir}"/>
1377 <env key="GSDLPATH" path="${basedir}/gs2build"/>
1378 </exec>
1379 <echo>Running GLI from Ant means that you don't get to see any of the terminal output. If you have problems with GLI and want to see the output, please run the script gli4gs3.sh/bat from the greenstone3/gli directory.
1380 </echo>
1381 </target>
1382
1383
1384<!-- ======================== TESTING Targets ========================= -->
1385
1386 <target name="test" description="Run the (incomplete) JUnit test suite "
1387 depends="init">
1388 <mkdir dir="${basedir}/test"/>
1389 <junit printsummary="withOutAndErr"
1390 errorproperty="test.failed"
1391 failureproperty="test.failed"
1392 fork="${junit.fork}">
1393 <formatter type="plain"/>
1394 <classpath>
1395 <pathelement location="${build.home}/gsdl3test.jar"/>
1396 <path refid="compile.classpath"/>
1397 </classpath>
1398 <test name="${testcase}" if="testcase"/>
1399 <batchtest todir="${basedir}/test" unless="testcase">
1400 <fileset dir="${build.home}"
1401 includes="**/*Test.class"
1402 />
1403 </batchtest>
1404 </junit>
1405 <echo>
1406 *********************************************
1407 Test output can be found in directory 'test'
1408 *********************************************
1409 </echo>
1410 </target>
[15044]1411 <target name="prepare-flax" description="check out flax source code from another repository" if="install.flax">
[14732]1412 <echo>checking out flax ...</echo>
1413 <mkdir dir="${basedir}/src/java/org/flax"/>
1414 <mkdir dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1415 <mkdir dir="${basedir}/web/WEB-INF/classes/flax"/>
1416 <mkdir dir="${basedir}/web/interfaces/flax"/>
1417 <mkdir dir="${basedir}/web/sites/flax"/>
[15042]1418 <mkdir dir="${basedir}/flax-resources"/>
[14732]1419 <svn>
1420 <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/flax/"
1421 destPath="${basedir}/src/java/org/flax"/>
1422 <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/greenstone/gsdl3/flax/"
1423 destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1424 <checkout url="${flax.svn.root}/flax1.0/trunk/web/WEB-INF/classes/flax/"
1425 destPath="${basedir}/web/WEB-INF/classes/flax"/>
1426 <checkout url="${flax.svn.root}/flax1.0/trunk/web/interfaces/flax/"
1427 destPath="${basedir}/web/interfaces/flax"/>
1428 <checkout url="${flax.svn.root}/flax1.0/trunk/web/sites/flax/"
[15028]1429 destPath="${basedir}/web/sites/flax"/>
[15034]1430 <checkout url="${flax.svn.root}/flax1.0/trunk/flax-resources"
[15042]1431 destPath="${basedir}/flax-resources"/>
[15028]1432 </svn>
[15044]1433 <echo>prepare flax files...</echo>
[14732]1434 <move file="${basedir}/web/WEB-INF/web.xml" tofile="${basedir}/web/WEB-INF/web.xml.greenstone3backup"/>
[15042]1435 <antcall target="flax-copy-files" />
[15034]1436
[14732]1437 <property name="coll.dir" value="${basedir}/web/sites/flax/collect"/>
[15028]1438 <unzip dest="${coll.dir}">
1439 <fileset dir="${coll.dir}">
1440 <include name="*.zip"/>
1441 </fileset>
1442 </unzip>
1443 <delete>
1444 <fileset dir="${coll.dir}" includes="*.zip"/>
1445 </delete>
1446 </target>
[15044]1447
1448 <target name="update-flax" description="update flax from repository">
[15037]1449 <echo>updating flax ...</echo>
1450 <svn>
1451 <update dir="${basedir}/src/java/org/flax"/>
1452 <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/>
1453 <update dir="${basedir}/web/WEB-INF/classes/flax"/>
1454 <update dir="${basedir}/web/interfaces/flax"/>
1455 <update dir="${basedir}/web/sites/flax"/>
1456 <svncall target="flax-copy-files" />
1457 </svn>
[15044]1458 </target>
[15042]1459
1460 <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories">
[15037]1461 <echo>copying flax files ...</echo>
1462 <copy file="${basedir}/web/WEB-INF/classes/flax/web.xml" todir="${basedir}/web/WEB-INF" overwrite="true" />
1463 <!-- A configuration file containing web service binding information for the axis engine -->
[15042]1464 <copy file="${basedir}/web/WEB-INF/classes/flax/server-config.wsdd" todir="${basedir}/web/WEB-INF" overwrite="true" />
1465 <copy file="${basedir}/flax-resources/flax-build.xml" todir="${basedir}" overwrite="true" />
1466
1467 </target>
[15038]1468 <!--install gdbm stuff -->
1469
1470 <!-- downloads the gdbm library -->
1471 <target name="prepare-gdbm" depends="init" if="install.gdbm">
1472 <get src="http://www.greenstone.org/gs3files/gdbm-1.8.3.tar.gz"
1473 dest="${src.packages.home}/gdbm-1.8.3.tar.gz" usetimestamp="true"/>
1474 <untar compression= "gzip" src="${src.packages.home}/gdbm-1.8.3.tar.gz" dest="${src.packages.home}" />
1475 <chmod dir="${src.packages.home}/gdbm-1.8.3" perm="ugo+wrx" includes="**" />
[15042]1476 <antcall target="configure-gdbm" />
1477 <antcall target="compile-gdbm" />
[15038]1478 </target>
1479
1480 <target name="configure-gdbm" if="install.gdbm">
1481 <echo>
1482 Configuring GDBM
1483 </echo>
1484 <exec executable="${gdbm.home}/configure" os="${os.mac},${os.unix}"
1485 dir="${gdbm.home}">
1486 <arg value="--prefix=${gdbm.home}"/>
1487 </exec>
1488 </target>
1489
1490 <target name="clean-gdbm" depends="init" if="install.gdbm">
1491 <echo>clean GDBM</echo>
1492 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}" >
1493 <arg value="clean"/>
1494 </exec>
1495 </target>
1496
1497 <target name="compile-gdbm" depends="init" if="install.gdbm">
1498 <echo>compile GDBM</echo>
1499 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}"/>
1500 <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}">
1501 <arg value="install"/>
1502 </exec>
1503 </target>
1504
1505
1506
[15028]1507</project>
1508
1509
Note: See TracBrowser for help on using the repository browser.