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