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

Last change on this file since 17519 was 17519, checked in by oranfry, 14 years ago

dont compile search4j in release process (as its now part of greenstone) and call make-installer-files-concrete with param

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