root/release-kits/lirk2/ant-scripts/create-distribution.xml @ 18848

Revision 18848, 4.5 KB (checked in by oranfry, 11 years ago)

more things to do around the httpd

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk2-create-distribution" default="create-distribution">
3
4    <target name="create-distribution">
5
6        <antcall target="export-gsdl-gli"><param name="dest" value="distributions/web"/></antcall>
7        <antcall target="drop-in-docs"><param name="gsdl.basedir" value="distributions/web"/></antcall>
8        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
9        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
10        <antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk2-targets -->
11        <antcall target="dist-unzip-packages"/>
12        <antcall target="drop-in-demo-collection" />
13        <antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets -->
14        <antcall target="drop-in-binaries" />
15        <antcall target="export-imagemagick-linux-binaries" />
16        <antcall target="export-wvware-linux-binaries" />
17        <antcall target="compile-gli" />
18        <antcall target="remove-unneeded-files" />
19        <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
20
21        <antcall target="create-binary-zip-linux"/>
22
23    </target>
24
25    <target name="drop-in-binaries">
26        <echo level="info">Dropping compiled binaries into distribution</echo>
27        <delete dir="distributions/web/bin/linux" />
28        <exec dir="${basedir}" executable="cp"><arg line="-r compiled/bin/linux distributions/web/bin"/></exec>
29        <exec dir="${basedir}" executable="cp"><arg line="compiled/cgi-bin/library.cgi distributions/web/cgi-bin"/></exec>
30        <exec dir="${basedir}" executable="cp"><arg line="compiled/cgi-bin/oaiserver.cgi distributions/web/cgi-bin"/></exec>
31        <exec dir="${basedir}" executable="cp"><arg line="-r compiled/apache-httpd distributions/web"/></exec>
32        <exec dir="${basedir}" executable="cp"><arg line="compiled/lib/java/build.properties distributions/web/lib/java"/></exec>
33        <copy file="${basedir}/compiled/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
34        <mkdir dir="${basedir}/distributions/web/etc/logs-gsi"/>
35    </target>
36
37    <target name="drop-in-demo-collection">
38        <echo level="info">Dropping rebuilt demo collection into distribution</echo>
39        <delete dir="distributions/web/collect/demo" />
40        <exec dir="${basedir}" executable="cp"><arg line="-r compiled/collect/demo distributions/web/collect"/></exec>
41    </target>
42
43    <target name="export-imagemagick-linux-binaries">
44        <delete dir="distributions/web/bin/linux/imagemagick"/>
45        <svn>
46            <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
47        </svn>
48    </target>
49   
50    <target name="export-wvware-linux-binaries">
51        <delete dir="distributions/web/bin/linux/wv"/>
52        <svn>
53            <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/wv" destPath="distributions/web/bin/linux/wv"/>
54        </svn>
55    </target>
56
57    <target name="compile-gli">
58        <echo>Compiling gli...</echo>
59        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
60
61        <echo>Creating jar...</echo>
62        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
63
64        <echo>Cleaning up intermediate files...</echo>
65        <delete dir="${basedir}/distributions/web/gli/jar"/>
66        <delete dir="${basedir}/distributions/web/gli/classes/org"/>
67
68        <echo>Putting gli server jar in a better place</echo>
69        <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
70            <arg line="gli/GLIServer.jar bin/java" />
71        </exec>
72    </target>
73
74    <target name="dist-unzip-packages">
75        <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"/>
76        <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/>
77    </target>
78
79
80    <target name="remove-unneeded-files">
81        <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
82        <delete><fileset dir="${basedir}/distributions/web" includes="win32.mak,win32cfg.h,Install.sh,Support.htm"/></delete>
83        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
84        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
85        <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
86        <delete dir="${basedir}/distributions/web/common-src/packages/windows"/>
87    </target>
88
89</project>
Note: See TracBrowser for help on using the browser.