Changeset 21650

Show
Ignore:
Timestamp:
27.01.2010 08:59:34 (9 years ago)
Author:
oranfry
Message:

tidied up the source code release-kits

Location:
main/trunk/release-kits/kits
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/kits/rk2/ant-scripts/build.xml

    r21648 r21650  
    1010<project name="rk2-build" default="rk2"> 
    1111 
    12     <property name="version.major" value="2"/> 
    13  
    1412    <!-- IMPORT OTHER ANT SCRIPTS --> 
    1513    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/> 
    16     <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/> 
    1714    <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/> 
    1815 
  • main/trunk/release-kits/kits/rk3/ant-scripts/build.xml

    r21648 r21650  
    1414    <!-- IMPORT OTHER ANT SCRIPTS --> 
    1515    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/> 
    16     <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/> 
    1716    <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone3-shared.xml"/> 
    1817 
  • main/trunk/release-kits/kits/sork2/ant-scripts/build.xml

    r21649 r21650  
    1010<project name="sork2-build" default="sork2"> 
    1111 
    12     <!-- CONSTANTS --> 
    13  
    14     <!-- for the benefit of the shared scripts, set release-kit home --> 
    15     <property name="rk.name" value="sork2"/> 
    16     <property name="rk.home" value="${sork2.home}" /> 
    17     <property name="rk.os" value="multi" /> 
    18     <property name="os.suffix" value="AnyPlatform"/> 
    19      
    2012    <!-- IMPORT OTHER ANT SCRIPTS --> 
    2113    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/> 
    2214    <import file="${rk.home}/shared/greenstone2/ant-scripts/greenstone2-shared.xml"/> 
    23     <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/> 
    2415 
    2516    <!-- THE MAIN TARGET --> 
    2617    <target name="sork2" depends="init"> 
    27         <antcall target="export-gsdl-gli"><param name="dest" value="distributions/Greenstone-${version}-source-distribution"/></antcall> 
    28         <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution"/></antcall> 
    29         <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/gli"/></antcall> 
    30         <antcall target="insert-winbin"/> 
    31         <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/Greenstone-${version}-source-distribution/bin/windows"/></antcall> 
    32         <antcall target="tweak-files" /> 
    33         <antcall target="create-archives"/> 
    34         <antcall target="create-sourcecode"/> 
    35     </target> 
    3618 
    37     <target name="properties"> 
    38         <echo>Required Properties:</echo> 
    39         <echo>version             the version string for the release</echo> 
    40         <echo/> 
     19        <!-- store the name of the distribution --> 
     20        <property name="dist.name" value="${dist.name}"/> 
    4121 
    42         <echo>Optional Properties:</echo> 
    43         <echo>branch.path         the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo> 
    44         <echo>branch.revision     the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo> 
    45         <echo/> 
    46     </target> 
     22        <!-- create distributions dir --> 
     23        <mkdir dir="distributions"/> 
    4724 
     25        <!-- export greenstone2 and gli --> 
     26        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone2"/><arg value="distributions/${dist.name}"/></exec> 
     27        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/gli"/><arg value="distributions/${dist.name}/gli"/></exec> 
    4828 
    49     <target name="tweak-files"> 
    50         <delete file="distributions/Greenstone-${version}-source-distribution/bin/linux/mgquery_old" /> 
    51     </target> 
     29        <!-- set version numbers --> 
     30        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/${dist.name}"/></antcall> 
     31        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall> 
    5232 
    53     <target name="insert-winbin"> 
    54         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows"/> 
     33        <!-- insert windows binaries --> 
     34        <delete dir="distributions/${dist.name}/bin/windows"/> 
    5535        <exec executable="svn"> 
    5636            <arg value="export"/> 
    5737            <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/> 
    58             <arg value="distributions/Greenstone-${version}-source-distribution/bin/windows"/> 
     38            <arg value="distributions/${dist.name}/bin/windows"/> 
    5939        </exec> 
    60         <get src="${server.exe.location}" dest="distributions/Greenstone-${version}-source-distribution/bin/windows/server.exe"/> 
    61          
    62         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/imagemagick"/> 
    63         <delete dir="distributions/Greenstone-${version}-source-distribution/bin/windows/ghostscript"/> 
    64     </target> 
     40        <get src="${server.exe.location}" dest="distributions/${dist.name}/bin/windows/server.exe"/> 
     41        <delete dir="distributions/${dist.name}/bin/windows/imagemagick"/> 
     42        <delete dir="distributions/${dist.name}/bin/windows/ghostscript"/> 
    6543 
    66     <target name="create-archives"> 
     44        <!-- insert windows perl --> 
     45        <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/bin/windows"/> 
     46 
     47        <!-- clean up --> 
     48        <delete file="distributions/${dist.name}/bin/linux/mgquery_old" /> 
     49 
     50        <!-- create the archives (source code distribution) --> 
    6751        <mkdir dir="products"/> 
    68         <delete file="products/Greenstone-${version}-source-distribution.zip"/> 
    69         <zip destfile="products/Greenstone-${version}-source-distribution.zip"  basedir="distributions" includes="Greenstone-${version}-source-distribution/**/*"/> 
     52        <delete file="products/${dist.name}.zip"/> 
     53        <zip destfile="products/${dist.name}.zip"  basedir="distributions" includes="${dist.name}/**/*"/> 
    7054        <exec dir="distributions" executable="tar"> 
    71             <arg line="-czf ../products/Greenstone-${version}-source-distribution.tar.gz Greenstone-${version}-source-distribution"/> 
     55            <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/> 
    7256        </exec> 
    73     </target> 
    7457 
    75     <target name="create-sourcecode"> 
     58        <!-- CREATE THE SOURCE CODE COMPONENT (SOURCE CODE TOP-UP TO THE BINARY RELEASE) --> 
     59 
    7660        <!-- create a directory for the sourcecode --> 
    7761        <mkdir dir="distributions/source-component"/> 
    7862 
    7963        <!-- copy the files in --> 
    80         <exec dir="distributions/Greenstone-${version}-source-distribution" executable="cp"> 
     64        <exec dir="distributions/${dist.name}" executable="cp"> 
    8165            <arg value="-r"/> 
    8266 
     
    136120            <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/> 
    137121        </exec> 
     122 
    138123    </target> 
    139124 
    140     <target name="export-gsdl-gli"> 
    141         <delete dir="${dest}"/> 
    142         <exec executable="svn"> 
    143             <arg value="export"/> 
    144             <arg value="${svn.root}/main/${branch.path}/greenstone2"/> 
    145             <arg value="${dest}"/> 
    146         </exec> 
    147         <exec executable="svn"> 
    148             <arg value="export"/> 
    149             <arg value="${svn.root}/main/${branch.path}/gli"/> 
    150             <arg value="${dest}/gli"/> 
    151         </exec> 
    152     </target> 
    153  
     125    <target name="properties" depends="core-properties"/> 
    154126 
    155127</project> 
  • main/trunk/release-kits/kits/sork3/ant-scripts/build.xml

    r21648 r21650  
    2020    <!-- IMPORT OTHER ANT SCRIPTS --> 
    2121    <import file="${rk.home}/shared/core/ant-scripts/shared.xml"/> 
    22     <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/> 
    2322    <import file="${rk.home}/shared/greenstone3/ant-scripts/greenstone3-shared.xml"/> 
    24  
    25     <!-- helper constant --> 
    26     <property name="dist.dirname" value="Greenstone-${version}-source-distribution"/> 
    2723 
    2824    <!-- THE MAIN TARGET --> 
    2925    <target name="sork3" depends="init"> 
    30         <antcall target="export-greenstone3"><param name="dest" value="distributions/${dist.dirname}"/></antcall> 
    31         <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distributions/${dist.dirname}"/></antcall> 
    32         <ant dir="distributions/${dist.dirname}" target="prepare"> 
     26 
     27        <!-- store the name of the distribution --> 
     28        <property name="dist.name" value="Greenstone-${version}-source-distribution"/> 
     29 
     30        <!-- export the greenstone3 base code --> 
     31        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/greenstone3"/><arg value="distributions/${dist.name}"/></exec> 
     32 
     33        <!-- set version numbers --> 
     34        <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="${basedir}/distributions/${dist.name}"/></antcall> 
     35 
     36        <!-- run ant prepare --> 
     37        <ant dir="distributions/${dist.name}" target="prepare"> 
    3338            <property name="properties.accepted" value="true"/> 
    3439            <property name="app.version" value="${version}"/> 
    3540        </ant> 
    36         <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.dirname}/gli"/></antcall> 
    37         <antcall target="insert-winbin"/> 
    38         <antcall target="insert-ant"/> 
    39         <antcall target="insert-windows-perl"><param name="todir" value="${basedir}/distributions/${dist.dirname}/gs2build/bin/windows"/></antcall> 
    40         <antcall target="tweak-files"/> 
    41         <ant dir="distributions/${dist.dirname}"> 
     41 
     42        <!-- set gli version numbers --> 
     43        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/${dist.name}/gli"/></antcall> 
     44 
     45        <!-- insert windows binaries --> 
     46        <delete dir="distributions/${dist.name}/gs2build/bin/windows"/> 
     47        <exec executable="svn"><arg value="export"/><arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/><arg value="distributions/${dist.name}/gs2build/bin/windows"/></exec> 
     48        <delete dir="distributions/${dist.name}/gs2build/bin/windows/imagemagick"/> 
     49        <delete dir="distributions/${dist.name}/gs2build/bin/windows/ghostscript"/> 
     50 
     51        <!-- insert windows perl --> 
     52        <unzip src="${rk.home}/shared/windows/perl.zip" dest="distributions/${dist.name}/gs2build/bin/windows"/> 
     53 
     54        <!-- clean up --> 
     55        <delete file="distributions/${dist.name}/gs2build/bin/linux/mgquery_old" /> 
     56        <delete file="distributions/${dist.name}/build.properties.in"/> 
     57        <delete><fileset dir="distributions/${dist.name}/packages" includes="**/*.zip,**/*.tar.gz"/></delete> 
     58 
     59        <!-- run greenstone3's own targets for fixing execute permissions --> 
     60        <ant dir="distributions/${dist.name}"> 
    4261            <target name="fix-execute-permissions"/> 
    4362            <target name="fix-execute-permissions-source"/> 
    4463        </ant> 
    45         <antcall target="create-archives"/> 
    46         <ant dir="." antfile="${sork3.home}/ant-scripts/create-sourcecode-component.xml" target="create-sourcecode-component"/> 
     64 
     65        <!-- create the archives --> 
     66        <mkdir dir="products"/> 
     67        <delete file="products/${dist.name}.zip"/> 
     68        <zip destfile="products/${dist.name}.zip"  basedir="distributions" includes="${dist.name}/**/*"/> 
     69        <exec dir="distributions" executable="tar"> 
     70            <arg line="-czf ../products/${dist.name}.tar.gz ${dist.name}"/> 
     71        </exec> 
     72 
     73        <!-- create the sourcecode component --> 
     74        <ant dir="." antfile="${rk.home}/kits/${rk.name}/ant-scripts/create-sourcecode-component.xml" target="create-sourcecode-component"/> 
    4775    </target> 
    4876 
    49     <target name="properties"> 
    50         <echo>Required Properties:</echo> 
    51         <echo>version             the version string for the release</echo> 
    52         <echo/> 
    53  
    54         <echo>Optional Properties:</echo> 
    55         <echo>branch.path         the branch of gsdl to make a release of. Eg: tags/2.81. Default: trunk.</echo> 
    56         <echo>branch.revision     the revision of gsdl to make a release of. Eg: 18273. Default: HEAD.</echo> 
    57         <echo/> 
    58     </target> 
    59  
    60  
    61     <target name="tweak-files"> 
    62         <delete file="distributions/${dist.dirname}/gs2build/bin/linux/mgquery_old" /> 
    63         <delete file="distributions/${dist.dirname}/build.properties.in"/> 
    64         <delete><fileset dir="distributions/${dist.dirname}/packages" includes="**/*.zip,**/*.tar.gz"/></delete> 
    65     </target> 
    66  
    67     <target name="insert-ant"> 
    68         <copy todir="distributions/${dist.dirname}/packages/ant"> 
    69             <fileset dir="${rk.home}/core/ant"/> 
    70         </copy> 
    71     </target> 
    72  
    73     <target name="insert-winbin"> 
    74         <delete dir="distributions/${dist.dirname}/gs2build/bin/windows"/> 
    75         <exec executable="svn"> 
    76             <arg value="export"/> 
    77             <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/> 
    78             <arg value="distributions/${dist.dirname}/gs2build/bin/windows"/> 
    79         </exec> 
    80         <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/imagemagick"/> 
    81         <delete dir="distributions/${dist.dirname}/gs2build/bin/windows/ghostscript"/> 
    82     </target> 
    83  
    84     <target name="create-archives"> 
    85         <mkdir dir="products"/> 
    86         <delete file="products/${dist.dirname}.zip"/> 
    87         <zip destfile="products/${dist.dirname}.zip"  basedir="distributions" includes="${dist.dirname}/**/*"/> 
    88         <exec dir="distributions" executable="tar"> 
    89             <arg line="-czf ../products/${dist.dirname}.tar.gz ${dist.dirname}"/> 
    90         </exec> 
    91     </target> 
    92  
    93     <target name="create-sourcecode"> 
    94         <!-- create a directory for the sourcecode --> 
    95         <mkdir dir="distributions/source-component/gs2build"/> 
    96  
    97         <!-- copy the files in --> 
    98         <exec dir="distributions/${dist.dirname}" executable="cp"> 
    99             <arg value="-r"/> 
    100  
    101             <!-- the bulk sourcecode --> 
    102             <arg value="gs2build/build-src"/> 
    103             <arg value="gs2build/common-src"/> 
    104  
    105             <!-- destination --> 
    106             <arg value="../source-component/gs2build"/> 
    107  
    108         </exec> 
    109          
    110         <!-- copy the files in --> 
    111         <exec dir="distributions/${dist.dirname}" executable="cp"> 
    112             <arg value="-r"/> 
    113  
    114             <!-- the bulk sourcecode --> 
    115             <arg value="src"/> 
    116  
    117             <!-- destination --> 
    118             <arg value="../source-component"/> 
    119  
    120         </exec> 
    121  
    122         <!-- unzip some packages --> 
    123         <unzip src="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip" dest="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv"/> 
    124         <delete file="distributions/source-component/gs2build/common-src/indexers/packages/windows/iconv/iconv.zip"/> 
    125          
    126         <unzip src="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/crypt"/> 
    127         <delete file="distributions/source-component/gs2build/common-src/packages/windows/crypt/crypt.zip"/> 
    128          
    129         <unzip src="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/expat"/> 
    130         <delete file="distributions/source-component/gs2build/common-src/packages/windows/expat/expat.zip"/> 
    131          
    132         <unzip src="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip" dest="distributions/source-component/gs2build/common-src/packages/windows/stlport"/> 
    133         <delete file="distributions/source-component/gs2build/common-src/packages/windows/stlport/stlport.zip"/> 
    134  
    135         <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/sqlite"><arg value="-xzf"/><arg value="sqlite-amalgamation-3.5.9.tar.gz"/></exec> 
    136         <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/> 
    137  
    138         <exec executable="tar" dir="distributions/source-component/gs2build/common-src/packages/expat"><arg value="-xzf"/><arg value="expat-1.95.8.tar.gz"/></exec> 
    139         <delete file="distributions/source-component/gs2build/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/> 
    140  
    141         <!-- archive it --> 
    142         <delete file="products/Greenstone-${version}-source-component.zip"/> 
    143         <zip destfile="products/Greenstone-${version}-source-component.zip" basedir="distributions/source-component" includes="**/*"/> 
    144         <exec dir="distributions/source-component" executable="bash"> 
    145             <arg value="-c"/> 
    146             <arg value="tar -czf ../../products/Greenstone-${version}-source-component.tar.gz *"/> 
    147         </exec> 
    148     </target> 
     77    <target name="properties" depends="core-properties"/> 
    14978 
    15079</project> 
  • main/trunk/release-kits/kits/sork3/ant-scripts/create-sourcecode-component.xml

    r20533 r21650  
    11<?xml version="1.0" encoding="utf-8" ?> 
    22<!-- this is in a separate file because <import> can only load files that exist before build starts. This separate project is exeuted using <ant> AFTER greenstone3 has been checked out, to allow us to import the source-fileset.xml file --> 
    3 <project name="create-sourcecode-component" default="csc"> 
    4     <echo>basedir: ${basedir}</echo> 
     3<project name="create-sourcecode-component"> 
    54 
    6     <import file="${basedir}/distributions/${dist.dirname}/resources/xml/components.xml"/> 
    7     <import file="${basedir}/distributions/${dist.dirname}/resources/xml/executables.xml"/> 
     5    <import file="distributions/${dist.name}/resources/xml/components.xml"/> 
     6    <import file="distributions/${dist.name}/resources/xml/executables.xml"/> 
    87 
    98    <target name="create-sourcecode-component"> 
    109 
    1110        <copy todir="distributions/source-component"> 
    12             <fileset dir="distributions/${dist.dirname}"> 
     11            <fileset dir="distributions/${dist.name}"> 
    1312                <patternset refid="greenstone3.source.component"/> 
    1413            </fileset>