[14982] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
[15956] | 2 | <project name="lirk2-create-distribution" default="create-distribution">
|
---|
[14982] | 3 |
|
---|
| 4 | <target name="create-distribution">
|
---|
[16739] | 5 | <antcall target="export-gsdl-gli" />
|
---|
| 6 | <antcall target="dist-set-version" />
|
---|
| 7 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
|
---|
| 8 | <antcall target="drop-in-binaries" />
|
---|
| 9 | <antcall target="drop-in-demo-collection" />
|
---|
| 10 | <antcall target="drop-in-docs" />
|
---|
[17441] | 11 | <!-- <antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> from rk2-targets -->
|
---|
[16739] | 12 | <antcall target="compile-gli" />
|
---|
| 13 | <antcall target="tweak-files" />
|
---|
[14982] | 14 | </target>
|
---|
| 15 |
|
---|
[16459] | 16 | <target name="export-gsdl-gli">
|
---|
[16739] | 17 | <mkdir dir="distributions"/>
|
---|
| 18 | <delete dir="distributions/web"/>
|
---|
| 19 | <svn>
|
---|
| 20 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
|
---|
| 21 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
|
---|
| 22 | </svn>
|
---|
[14982] | 23 | </target>
|
---|
| 24 |
|
---|
[15956] | 25 | <target name="dist-set-version">
|
---|
[16739] | 26 | <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
|
---|
| 27 | <rsr file="${basedir}/distributions/web/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
[14982] | 28 |
|
---|
[16739] | 29 | <echo level="info">Setting version in Install.sh</echo>
|
---|
| 30 | <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo "Version: ).*(" .*)" replacement="$1${version}$2" />
|
---|
[15956] | 31 |
|
---|
[16739] | 32 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
| 33 | <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
[14982] | 34 | </target>
|
---|
| 35 |
|
---|
[15980] | 36 | <target name="drop-in-binaries">
|
---|
[16739] | 37 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
| 38 | <delete dir="distributions/web/bin/linux" />
|
---|
| 39 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
|
---|
[17268] | 40 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/bin/search4j distributions/web/bin"/></exec>
|
---|
[16739] | 41 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
|
---|
| 42 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec>
|
---|
[15980] | 43 | </target>
|
---|
| 44 |
|
---|
| 45 | <target name="drop-in-demo-collection">
|
---|
[16739] | 46 | <echo level="info">Dropping rebuilt demo collection into distribution</echo>
|
---|
| 47 | <delete dir="distributions/web/collect/demo" />
|
---|
| 48 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
|
---|
[15980] | 49 | </target>
|
---|
| 50 |
|
---|
[16241] | 51 | <target name="drop-in-docs">
|
---|
[16739] | 52 | <echo level="info">Dropping gsdl docs into distribution</echo>
|
---|
| 53 | <copy todir="${basedir}/distributions/web" overwrite="true">
|
---|
| 54 | <fileset dir="${lirk2.home}/greenstone2/docs"/>
|
---|
| 55 | </copy>
|
---|
[16241] | 56 | </target>
|
---|
[15980] | 57 |
|
---|
[15956] | 58 | <target name="compile-gli">
|
---|
[16739] | 59 | <echo>Compiling gli...</echo>
|
---|
| 60 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
|
---|
[14982] | 61 |
|
---|
[16739] | 62 | <echo>Creating jar...</echo>
|
---|
| 63 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
|
---|
[15956] | 64 |
|
---|
[16739] | 65 | <echo>Cleaning up intermediate files...</echo>
|
---|
| 66 | <delete dir="${basedir}/distributions/web/gli/jar"/>
|
---|
| 67 | <delete dir="${basedir}/distributions/web/gli/classes/org"/>
|
---|
[15956] | 68 |
|
---|
[16739] | 69 | <echo>Putting gli server jar in a better place</echo>
|
---|
| 70 | <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
|
---|
| 71 | <arg line="gli/GLIServer.jar bin/java" />
|
---|
| 72 | </exec>
|
---|
[14982] | 73 | </target>
|
---|
| 74 |
|
---|
[15956] | 75 | <target name="tweak-files">
|
---|
[16739] | 76 | <echo level="info">Changing Install.sh to web release</echo>
|
---|
| 77 | <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" />
|
---|
[14982] | 78 |
|
---|
[16739] | 79 | <echo level="info">Changing date and version in the docs</echo>
|
---|
| 80 | <!-- ar -->
|
---|
| 81 | <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(اÙتارÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
|
---|
| 82 | <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(اÙÙسخ٠: \s*)(.*)" replacement="$1${version}" />
|
---|
[14982] | 83 |
|
---|
[16739] | 84 | <!-- es -->
|
---|
| 85 | <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
|
---|
| 86 | <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
|
---|
| 87 | <!-- fr -->
|
---|
| 88 | <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
|
---|
| 89 | <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
| 90 | <!-- ru -->
|
---|
| 91 | <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ÐаÑа\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
|
---|
| 92 | <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ÐеÑÑОÑ\s*)(.*)" replacement="$1${version}" />
|
---|
| 93 | <!-- en -->
|
---|
| 94 | <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
|
---|
| 95 | <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
[14982] | 96 |
|
---|
[16739] | 97 | <!-- Support.htm -->
|
---|
| 98 | <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(<br>.*)" replacement="$1${version}$2"/>
|
---|
| 99 | <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*<input.* name="gsdl version".* value=").*(".*>)" replacement="$1${version}$2"/>
|
---|
[16241] | 100 |
|
---|
[16739] | 101 | <echo level="info">Removing signed gatherer</echo>
|
---|
| 102 | <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
|
---|
[16241] | 103 |
|
---|
[16739] | 104 | <echo level="info">Removing some unneeded stuff</echo>
|
---|
| 105 | <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
|
---|
| 106 | <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
|
---|
| 107 | <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
|
---|
| 108 | <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
|
---|
[16241] | 109 |
|
---|
[15980] | 110 | </target>
|
---|
[14982] | 111 |
|
---|
| 112 | </project>
|
---|