source: release-kits/mark2/ant-scripts/create-distribution.xml@ 17441

Last change on this file since 17441 was 17441, checked in by oranfry, 13 years ago

temoprarily commenting out calls to inster-uninstaller in linux release kits, and fixing an incorrect reference to server.exe

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