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

Revision 17959, 5.2 KB (checked in by oranfry, 11 years ago)

typo fix

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.home" 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"/></exec>
67    </target>
68
69    <target name="drop-in-demo-collection">
70        <echo level="info">Dropping rebuilt demo collection into distribution</echo>
71        <delete dir="distributions/web/collect/demo" />
72        <exec dir="${basedir}" executable="cp"><arg line="-r compiled/collect/demo distributions/web/collect"/></exec>
73    </target>
74
75    <target name="export-imagemagick-linux-binaries">
76        <delete dir="distributions/web/bin/linux/imagemagick"/>
77        <svn>
78            <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
79        </svn>
80    </target>
81
82    <target name="compile-gli">
83        <echo>Compiling gli...</echo>
84        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
85
86        <echo>Creating jar...</echo>
87        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
88
89        <echo>Cleaning up intermediate files...</echo>
90        <delete dir="${basedir}/distributions/web/gli/jar"/>
91        <delete dir="${basedir}/distributions/web/gli/classes/org"/>
92
93        <echo>Putting gli server jar in a better place</echo>
94        <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
95            <arg line="gli/GLIServer.jar bin/java" />
96        </exec>
97    </target>
98
99    <target name="remove-unneeded-files-2">
100        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
101        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
102        <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
103        <delete dir="${basedir}/distributions/web/common-src/packages/windows"/>
104    </target>
105
106</project>
Note: See TracBrowser for help on using the browser.