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