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