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

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

started source releases

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