[14982] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 |
|
---|
| 3 | <!--
|
---|
| 4 | ..........................................................
|
---|
| 5 | September 2007
|
---|
| 6 | Greenstone3 'release maker' script
|
---|
| 7 | Oran Fry
|
---|
| 8 | ..........................................................
|
---|
| 9 | -->
|
---|
| 10 |
|
---|
[15956] | 11 | <project name="lirk2-create-distribution" default="create-distribution">
|
---|
[14982] | 12 |
|
---|
| 13 |
|
---|
| 14 | <target name="create-distribution">
|
---|
[15957] | 15 | <addressedcall target="export-gsdl-gli-indexers" />
|
---|
| 16 | <addressedcall target="dist-set-version" />
|
---|
[15980] | 17 | <addressedcall target="drop-in-binaries" />
|
---|
| 18 | <addressedcall target="drop-in-demo-collection" />
|
---|
[15957] | 19 | <addressedcall target="compile-gli" />
|
---|
| 20 | <addressedcall target="create-gli-client-zip" />
|
---|
| 21 | <addressedcall target="tweak-files" />
|
---|
[14982] | 22 | </target>
|
---|
| 23 |
|
---|
[15956] | 24 | <target name="export-gsdl-gli-indexers">
|
---|
| 25 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[14982] | 26 |
|
---|
[15980] | 27 | <mkdir dir="distributions"/>
|
---|
| 28 | <delete dir="distributions/web"/>
|
---|
[15956] | 29 | <svn>
|
---|
[15980] | 30 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
|
---|
[15956] | 31 | </svn>
|
---|
[14982] | 32 |
|
---|
[15956] | 33 | <svn>
|
---|
[15980] | 34 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
|
---|
[15956] | 35 | </svn>
|
---|
[14982] | 36 |
|
---|
| 37 | <svn>
|
---|
[15980] | 38 | <export srcurl="${svn.root}/indexers/${branch.path}" destPath="distributions/web/indexers"/>
|
---|
[14982] | 39 | </svn>
|
---|
[15956] | 40 |
|
---|
[14982] | 41 | </if>
|
---|
| 42 | </target>
|
---|
| 43 |
|
---|
[15956] | 44 | <target name="dist-set-version">
|
---|
[14982] | 45 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 46 |
|
---|
[15956] | 47 | <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
|
---|
[15980] | 48 | <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
[15956] | 49 |
|
---|
| 50 | <echo level="info">Setting version in Install.sh</echo>
|
---|
[15980] | 51 | <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo "Version: ).*(" .*)" replacement="$1${version}$2" />
|
---|
[15956] | 52 |
|
---|
| 53 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
[15980] | 54 | <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
[15956] | 55 |
|
---|
[14982] | 56 | </if>
|
---|
| 57 | </target>
|
---|
| 58 |
|
---|
[15980] | 59 | <target name="drop-in-binaries">
|
---|
| 60 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 61 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
| 62 | <delete dir="distributions/web/bin/linux" />
|
---|
| 63 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
|
---|
| 64 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
|
---|
| 65 | <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiservr distributions/web/cgi-bin"/></exec>
|
---|
| 66 | </if>
|
---|
| 67 | </target>
|
---|
| 68 |
|
---|
| 69 | <target name="drop-in-demo-collection">
|
---|
| 70 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 71 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
| 72 | <delete dir="distributions/web/collect/demo" />
|
---|
| 73 | <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
|
---|
| 74 | </if>
|
---|
| 75 | </target>
|
---|
| 76 |
|
---|
| 77 |
|
---|
[15956] | 78 | <target name="compile-gli">
|
---|
[14982] | 79 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 80 |
|
---|
[15956] | 81 | <echo>Compiling gli...</echo>
|
---|
[15980] | 82 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
|
---|
[15956] | 83 |
|
---|
| 84 | <echo>Creating jar...</echo>
|
---|
[15980] | 85 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
|
---|
[15956] | 86 |
|
---|
| 87 | <echo>Cleaning up intermediate files...</echo>
|
---|
[15980] | 88 | <delete dir="${basedir}/distributions/web/gli/jar"/>
|
---|
| 89 | <delete dir="${basedir}/distributions/web/gli/classes/org"/>
|
---|
[15956] | 90 |
|
---|
| 91 | <echo>Putting gli server jar in a better place</echo>
|
---|
[15980] | 92 | <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
|
---|
[15956] | 93 | <arg line="gli/GLIServer.jar bin/java" />
|
---|
| 94 | </exec>
|
---|
| 95 |
|
---|
[14982] | 96 | </if>
|
---|
| 97 | </target>
|
---|
| 98 |
|
---|
[15956] | 99 | <target name="create-gli-client-zip">
|
---|
[14982] | 100 | <if><bool><istrue value="${execute}"/></bool>
|
---|
[15956] | 101 | <!--
|
---|
| 102 | # take a copy of GLI directory
|
---|
| 103 | &util::cp_r(&util::filename_cat($tmpdir, "gsdl", "gli"), $tmpdir);
|
---|
[14982] | 104 |
|
---|
[15956] | 105 | my $client_dirname = "gli-client-" . $version_num;
|
---|
| 106 | rename ("gli", $client_dirname);
|
---|
| 107 | chdir(&util::filename_cat($tmpdir, $client_dirname));
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 | # delete unnecessary stuff
|
---|
| 111 | `rm -rf clean.* document.* gems.* gli*.sh gli*.bat make*.sh make*.bat lib src`;
|
---|
| 112 | # make sure permissions are ok
|
---|
| 113 | `chmod a+x client-gli.sh client-gli.bat`;
|
---|
| 114 | chdir($tmpdir);
|
---|
| 115 |
|
---|
| 116 | # zip up the client
|
---|
| 117 | &zip($client_dirname, $client_dirname, $tmpdir, 1);
|
---|
| 118 | -->
|
---|
[14982] | 119 | </if>
|
---|
| 120 | </target>
|
---|
| 121 |
|
---|
[15956] | 122 |
|
---|
| 123 | <target name="tweak-files">
|
---|
[14982] | 124 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 125 |
|
---|
[15956] | 126 | <echo level="info">Changing Install.sh to web release</echo>
|
---|
[15980] | 127 | <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" />
|
---|
[14982] | 128 |
|
---|
[15980] | 129 | <echo level="info">Putting the COPYING file into distribution</echo>
|
---|
| 130 | <copy file="${lirk2.home}/resources/COPYING" tofile="${basedir}/distributions/web/COPYING" />
|
---|
[14982] | 131 |
|
---|
[15980] | 132 | <echo level="info">Removing signed gatherer</echo>
|
---|
| 133 | <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
|
---|
[14982] | 134 |
|
---|
[15980] | 135 | <echo level="info">Removing some unneeded stuff</echo>
|
---|
| 136 | <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
|
---|
| 137 | <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
|
---|
| 138 | <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
|
---|
| 139 | <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
|
---|
[14982] | 140 |
|
---|
[15980] | 141 | </if>
|
---|
| 142 | </target>
|
---|
[14982] | 143 |
|
---|
| 144 | </project>
|
---|