source: release-kits/lirk2/ant-scripts/create-distribution.xml@ 17993

Last change on this file since 17993 was 17993, checked in by max, 15 years ago

Add lucenewrapper.jar

File size: 5.3 KB
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="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
8 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
9 <antcall target="drop-in-docs" />
10 <antcall target="tweak-files" />
11 <antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk2-targets -->
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="remove-unneeded-files-1" />
15
16 <antcall target="drop-in-binaries" />
17 <antcall target="export-imagemagick-linux-binaries" />
18 <antcall target="compile-gli" />
19 <antcall target="remove-unneeded-files-2" />
20
21 </target>
22
23 <target name="tweak-files">
24 <echo level="info">Changing Install.sh to web release</echo>
25 <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" />
26
27 <echo level="info">Changing date and version in the docs</echo>
28 <!-- ar -->
29 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
30 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" />
31
32 <!-- es -->
33 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
34 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
35 <!-- fr -->
36 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
37 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
38 <!-- ru -->
39 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
40 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" />
41 <!-- en -->
42 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
43 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
44
45 </target>
46
47
48 <target name="drop-in-docs">
49 <echo level="info">Dropping gsdl docs into distribution</echo>
50 <copy todir="${basedir}/distributions/web" overwrite="true">
51 <fileset dir="${lirk2.home}/greenstone2/docs"/>
52 </copy>
53 </target>
54
55 <target name="remove-unneeded-files-1">
56 <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
57 <!-- delete non-linux source stuff -->
58 <delete><fileset dir="${basedir}/distributions/web" includes="win32.mak,WIN32cfg.h,Install.txt"/></delete>
59 </target>
60
61 <target name="drop-in-binaries">
62 <echo level="info">Dropping compiled binaries into distribution</echo>
63 <delete dir="distributions/web/bin/linux" />
64 <exec dir="${basedir}" executable="cp"><arg line="-r compiled/bin/linux distributions/web/bin"/></exec>
65 <exec dir="${basedir}" executable="cp"><arg line="compiled/cgi-bin/library distributions/web/cgi-bin"/></exec>
66 <exec dir="${basedir}" executable="cp"><arg line="compiled/cgi-bin/oaiserver distributions/web/cgi-bin"/>
67</exec>
68<copy file="${basedir}/compiled/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
69 </target>
70
71 <target name="drop-in-demo-collection">
72 <echo level="info">Dropping rebuilt demo collection into distribution</echo>
73 <delete dir="distributions/web/collect/demo" />
74 <exec dir="${basedir}" executable="cp"><arg line="-r compiled/collect/demo distributions/web/collect"/></exec>
75 </target>
76
77 <target name="export-imagemagick-linux-binaries">
78 <delete dir="distributions/web/bin/linux/imagemagick"/>
79 <svn>
80 <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
81 </svn>
82 </target>
83
84 <target name="compile-gli">
85 <echo>Compiling gli...</echo>
86 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
87
88 <echo>Creating jar...</echo>
89 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
90
91 <echo>Cleaning up intermediate files...</echo>
92 <delete dir="${basedir}/distributions/web/gli/jar"/>
93 <delete dir="${basedir}/distributions/web/gli/classes/org"/>
94
95 <echo>Putting gli server jar in a better place</echo>
96 <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
97 <arg line="gli/GLIServer.jar bin/java" />
98 </exec>
99 </target>
100
101 <target name="remove-unneeded-files-2">
102 <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
103 <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
104 <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
105 <delete dir="${basedir}/distributions/web/common-src/packages/windows"/>
106 </target>
107
108</project>
Note: See TracBrowser for help on using the repository browser.