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

Last change on this file since 17956 was 17956, checked in by oranfry, 16 years ago

dont try to create the source distibution anymore as that is done by sork

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