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