Changeset 17649

Show
Ignore:
Timestamp:
31.10.2008 13:40:08 (11 years ago)
Author:
oranfry
Message:

distribution and component changes for source releases in lirk2

Location:
release-kits/lirk2/ant-scripts
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • release-kits/lirk2/ant-scripts/create-components.xml

    r17644 r17649  
    33 
    44    <!-- create components from the distribution folder --> 
     5 
     6    <!-- 1st level --> 
    57    <target name="create-components"> 
    68        <antcall target="prepare-components" /> 
     
    810    </target> 
    911 
     12    <!-- 2nd level --> 
    1013    <target name="prepare-components"> 
    1114        <antcall target="prepare-core-component" /> 
    1215        <antcall target="prepare-sourcecode-component" /> 
    1316        <antcall target="prepare-imagemagick-component" /> 
    14  
     17        <antcall target="prepare-sourcecode-core-component" /> 
    1518    </target> 
    1619 
     
    1922        <antcall target="compress-sourcecode-component" />   
    2023        <antcall target="compress-imagemagick-component" /> 
     24        <antcall target="compress-sourcecode-core-component" /> 
    2125    </target> 
    22      
     26 
     27    <!-- 3rd level -->   
    2328    <target name="prepare-core-component"> 
    2429 
     
    8994        <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/> 
    9095    </target> 
     96 
     97    <target name="prepare-sourcecode-core-component"> 
     98        <delete dir="components/tmp/sourcecode-core"/> 
     99        <mkdir dir="components/tmp/sourcecode-core"/> 
     100 
     101        <copy todir="components/tmp/sourcecode-core" overwrite="true"> 
     102            <fileset dir="distributions/source"> 
     103                <include name="macros/**/*"/> 
     104                <include name="images/**/*"/> 
     105                <include name="etc/**/*"/> 
     106                <include name="gli/**/*"/> 
     107                <include name="collect/**/*"/> 
     108                <include name="doc/**/*"/> 
     109                <include name="setup.bash"/> 
     110            </fileset> 
     111        </copy> 
     112        <zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/> 
     113    </target> 
    91114     
     115    <target name="compress-sourcecode-core-component"> 
     116        <sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/> 
     117    </target> 
     118 
    92119</project> 
  • release-kits/lirk2/ant-scripts/create-distribution.xml

    r17644 r17649  
    33 
    44    <target name="create-distribution"> 
     5 
    56        <antcall target="export-gsdl-gli" /> 
    67        <antcall target="dist-set-version" /> 
    78        <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" /> 
     14 
    815        <antcall target="drop-in-binaries" /> 
    916        <antcall target="drop-in-demo-collection" /> 
    10         <antcall target="drop-in-docs" /> 
    1117        <antcall target="insert-uninstaller"><param name="script-format" value="sh"/></antcall> <!-- from rk2-targets --> 
    1218        <antcall target="insert-export-to-cd-package"/>     <!-- from rk2-targets --> 
    1319        <antcall target="export-imagemagick-linux-binaries" /> 
    1420        <antcall target="compile-gli" /> 
    15         <antcall target="tweak-files" /> 
     21        <antcall target="remove-unneeded-files-2" /> 
     22 
    1623    </target> 
    1724 
     
    2532    </target> 
    2633     
    27     <target name="export-imagemagick-linux-binaries"> 
    28         <delete dir="distributions/web/bin/linux/imagemagick"/> 
    29         <svn> 
    30             <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/> 
    31         </svn> 
    32     </target> 
    33  
    3434    <target name="dist-set-version"> 
    3535        <echo level="info">Setting version in src/lib/gsdlconf.h</echo> 
     
    4141        <echo level="info">Setting version in etc/VERSION</echo> 
    4242        <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" /> 
    43     </target> 
    44  
    45     <target name="drop-in-binaries"> 
    46         <echo level="info">Dropping compiled binaries into distribution</echo> 
    47         <delete dir="distributions/web/bin/linux" /> 
    48         <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec> 
    49         <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec> 
    50         <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec> 
    51     </target> 
    52  
    53     <target name="drop-in-demo-collection"> 
    54         <echo level="info">Dropping rebuilt demo collection into distribution</echo> 
    55         <delete dir="distributions/web/collect/demo" /> 
    56         <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec> 
    57     </target> 
    58  
    59     <target name="drop-in-docs"> 
    60         <echo level="info">Dropping gsdl docs  into distribution</echo> 
    61         <copy todir="${basedir}/distributions/web" overwrite="true"> 
    62             <fileset dir="${lirk2.home}/greenstone2/docs"/> 
    63         </copy> 
    64     </target> 
    65  
    66     <target name="compile-gli"> 
    67         <echo>Compiling gli...</echo> 
    68         <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/> 
    69  
    70         <echo>Creating jar...</echo> 
    71         <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/> 
    72  
    73         <echo>Cleaning up intermediate files...</echo> 
    74         <delete dir="${basedir}/distributions/web/gli/jar"/> 
    75         <delete dir="${basedir}/distributions/web/gli/classes/org"/> 
    76  
    77         <echo>Putting gli server jar in a better place</echo> 
    78         <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true"> 
    79             <arg line="gli/GLIServer.jar bin/java" /> 
    80         </exec> 
    8143    </target> 
    8244 
     
    10769        <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/> 
    10870 
    109         <echo level="info">Removing signed gatherer</echo> 
    110         <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" /> 
     71    </target> 
    11172 
    112         <echo level="info">Removing some unneeded stuff</echo> 
     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"> 
    11382        <delete file="${basedir}/distributions/web/gli/.greenstonestore" /> 
    114         <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" /> 
    11583        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete> 
    11684        <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete> 
    117  
     85        <delete dir="${basedir}/distributions/web/common-src/packages/windows"/> 
    11886    </target> 
    11987 
     88    <target name="copy-web-to-source"> 
     89        <copy todir="distributions/source"><fileset dir="distributions/web"/></copy> 
     90    </target> 
     91 
     92    <target name="drop-in-binaries"> 
     93        <echo level="info">Dropping compiled binaries into distribution</echo> 
     94        <delete dir="distributions/web/bin/linux" /> 
     95        <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec> 
     96        <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec> 
     97        <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec> 
     98    </target> 
     99 
     100    <target name="drop-in-demo-collection"> 
     101        <echo level="info">Dropping rebuilt demo collection into distribution</echo> 
     102        <delete dir="distributions/web/collect/demo" /> 
     103        <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec> 
     104    </target> 
     105 
     106    <target name="export-imagemagick-linux-binaries"> 
     107        <delete dir="distributions/web/bin/linux/imagemagick"/> 
     108        <svn> 
     109            <export srcurl="${svn.root}/other-projects/trunk/linux-binaries/imagemagick" destPath="distributions/web/bin/linux/imagemagick"/> 
     110        </svn> 
     111    </target> 
     112 
     113    <target name="compile-gli"> 
     114        <echo>Compiling gli...</echo> 
     115        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/> 
     116 
     117        <echo>Creating jar...</echo> 
     118        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/> 
     119 
     120        <echo>Cleaning up intermediate files...</echo> 
     121        <delete dir="${basedir}/distributions/web/gli/jar"/> 
     122        <delete dir="${basedir}/distributions/web/gli/classes/org"/> 
     123 
     124        <echo>Putting gli server jar in a better place</echo> 
     125        <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true"> 
     126            <arg line="gli/GLIServer.jar bin/java" /> 
     127        </exec> 
     128    </target> 
     129 
     130    <target name="remove-unneeded-files-2"> 
     131        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" /> 
     132    </target> 
     133 
     134 
    120135</project>