[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">
|
---|
[17649] | 5 |
|
---|
[16739] | 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>
|
---|
[17649] | 9 | <antcall target="drop-in-docs" />
|
---|
| 10 | <antcall target="tweak-files" />
|
---|
[17786] | 11 | <antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk2-targets -->
|
---|
| 12 | <antcall target="drop-in-demo-collection" />
|
---|
| 13 | <antcall target="insert-export-to-cd-package"/> <!-- from rk2-targets -->
|
---|
[17649] | 14 | <antcall target="remove-unneeded-files-1" />
|
---|
| 15 |
|
---|
[17652] | 16 | <antcall target="copy-web-to-source" /> <!-- from init -->
|
---|
[17649] | 17 |
|
---|
[16739] | 18 | <antcall target="drop-in-binaries" />
|
---|
[17644] | 19 | <antcall target="export-imagemagick-linux-binaries" />
|
---|
[16739] | 20 | <antcall target="compile-gli" />
|
---|
[17649] | 21 | <antcall target="remove-unneeded-files-2" />
|
---|
| 22 |
|
---|
[14982] | 23 | </target>
|
---|
| 24 |
|
---|
[16459] | 25 | <target name="export-gsdl-gli">
|
---|
[16739] | 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>
|
---|
[14982] | 32 | </target>
|
---|
[17644] | 33 |
|
---|
[15956] | 34 | <target name="dist-set-version">
|
---|
[16739] | 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) ".*"" replacement="$1 "${version}"" />
|
---|
[14982] | 37 |
|
---|
[16739] | 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 |
|
---|
[16739] | 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 |
|
---|
[17649] | 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"no"" />
|
---|
| 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: ).*(<br>.*)" replacement="$1${version}$2"/>
|
---|
| 69 | <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*<input.* name="gsdl version".* value=").*(".*>)" 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 | </target>
|
---|
| 84 |
|
---|
[15980] | 85 | <target name="drop-in-binaries">
|
---|
[16739] | 86 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
| 87 | <delete dir="distributions/web/bin/linux" />
|
---|
| 88 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
|
---|
| 89 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
|
---|
| 90 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec>
|
---|
[15980] | 91 | </target>
|
---|
| 92 |
|
---|
| 93 | <target name="drop-in-demo-collection">
|
---|
[16739] | 94 | <echo level="info">Dropping rebuilt demo collection into distribution</echo>
|
---|
| 95 | <delete dir="distributions/web/collect/demo" />
|
---|
| 96 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
|
---|
[15980] | 97 | </target>
|
---|
| 98 |
|
---|
[17649] | 99 | <target name="export-imagemagick-linux-binaries">
|
---|
| 100 | <delete dir="distributions/web/bin/linux/imagemagick"/>
|
---|
| 101 | <svn>
|
---|
| 102 | <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/>
|
---|
| 103 | </svn>
|
---|
[16241] | 104 | </target>
|
---|
[15980] | 105 |
|
---|
[15956] | 106 | <target name="compile-gli">
|
---|
[16739] | 107 | <echo>Compiling gli...</echo>
|
---|
| 108 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
|
---|
[14982] | 109 |
|
---|
[16739] | 110 | <echo>Creating jar...</echo>
|
---|
| 111 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
|
---|
[15956] | 112 |
|
---|
[16739] | 113 | <echo>Cleaning up intermediate files...</echo>
|
---|
| 114 | <delete dir="${basedir}/distributions/web/gli/jar"/>
|
---|
| 115 | <delete dir="${basedir}/distributions/web/gli/classes/org"/>
|
---|
[15956] | 116 |
|
---|
[16739] | 117 | <echo>Putting gli server jar in a better place</echo>
|
---|
| 118 | <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
|
---|
| 119 | <arg line="gli/GLIServer.jar bin/java" />
|
---|
| 120 | </exec>
|
---|
[14982] | 121 | </target>
|
---|
| 122 |
|
---|
[17649] | 123 | <target name="remove-unneeded-files-2">
|
---|
[16739] | 124 | <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
|
---|
[17786] | 125 | <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
|
---|
| 126 | <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
|
---|
| 127 | <delete dir="${basedir}/distributions/web/common-src/packages/windows"/>
|
---|
[17649] | 128 | </target>
|
---|
[16241] | 129 |
|
---|
[14982] | 130 | </project>
|
---|