Changeset 19980

Show
Ignore:
Timestamp:
09.07.2009 12:18:52 (10 years ago)
Author:
oranfry
Message:

use the generalised targets to create components

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

Legend:

Unmodified
Added
Removed
  • release-kits/lirk3/ant-scripts/build.xml

    r19935 r19980  
    2626    <import file="compile.xml"/> 
    2727    <import file="create-distribution.xml"/> 
    28     <import file="create-components.xml"/> 
    2928    <import file="create-installer.xml"/> 
    3029    <import file="wrap.xml"/> 
     
    3433        <antcall target="compile"/> 
    3534        <antcall target="create-distribution"/> 
    36         <antcall target="create-components"/> 
     35        <ant inheritRefs="true" dir="." antfile="${lirk3.home}/ant-scripts/create-components.xml" target="create-components"/> 
    3736        <antcall target="create-installer"/> 
    3837        <antcall target="wrap"/> 
  • release-kits/lirk3/ant-scripts/create-components.xml

    r19964 r19980  
    22<project name="lirk3-create-components" default="create-components"> 
    33 
     4    <import file="${basedir}/distributions/web/resources/xml/components.xml"/> 
     5    <import file="${rk.home}/greenstone3/ant-scripts/rk3-targets.xml"/> 
     6 
    47    <!-- create components from the distributions folder --> 
    58 
    6     <!-- 1st level --> 
    79    <target name="create-components"> 
    810        <antcall target="prepare-components" /> 
     
    1012    </target> 
    1113 
    12     <!-- 2nd level --> 
    1314    <target name="prepare-components"> 
    14         <antcall target="prepare-core-component" /> 
    15         <antcall target="prepare-ant-component" /> 
    16         <antcall target="prepare-tomcat-component" /> 
    17         <antcall target="prepare-imagemagick-component" /> 
     15        <antcall target="prepare-component"><param name="component" value="core"/></antcall> 
     16        <antcall target="prepare-component"><param name="component" value="ant"/></antcall> 
     17        <antcall target="prepare-component"><param name="component" value="tomcat"/></antcall> 
     18        <antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall> 
    1819    </target> 
    1920 
    2021    <target name="compress-components"> 
    21         <antcall target="compress-core-component" /> 
    22         <antcall target="compress-ant-component" /> 
    23         <antcall target="compress-tomcat-component" /> 
    24         <antcall target="compress-imagemagick-component" /> 
    25     </target> 
    26  
    27     <!-- 3rd level --> 
    28  
    29     <!-- core --> 
    30     <target name="prepare-core-component"> 
    31  
    32         <delete dir="components/tmp/core"/> 
    33         <mkdir dir="components/tmp/core"/> 
    34                  
    35         <copy todir="components/tmp/core" overwrite="true"> 
    36             <fileset dir="distributions/web"> 
    37                 <include name="**/*"/> 
    38  
    39                 <!-- exclude all components --> 
    40                 <exclude name="packages/ant"/> 
    41                 <exclude name="packages/ant/**/*"/> 
    42                 <exclude name="packages/tomcat"/> 
    43                 <exclude name="packages/tomcat/**/*"/> 
    44                 <exclude name="distributions/web/gs2build/bin/linux/imagemagick"/> 
    45                 <exclude name="distributions/web/gs2build/bin/linux/imagemagick/**/*"/> 
    46  
    47             </fileset> 
    48         </copy> 
    49          
    50         <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" /> 
    51     </target> 
    52      
    53     <target name="compress-core-component"> 
    54         <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/> 
    55     </target> 
    56  
    57     <!-- ant -->     
    58     <target name="prepare-ant-component"> 
    59  
    60         <delete dir="components/tmp/ant"/> 
    61         <mkdir dir="components/tmp/ant"/> 
    62  
    63         <copy todir="components/tmp/ant" overwrite="true"> 
    64             <fileset dir="distributions/web" includes="packages/ant/**/*"/> 
    65         </copy> 
    66          
    67         <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" /> 
    68     </target> 
    69          
    70     <target name="compress-ant-component"> 
    71         <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/> 
    72     </target> 
    73      
    74     <!-- tomcat --> 
    75     <target name="prepare-tomcat-component"> 
    76  
    77         <delete dir="components/tmp/tomcat"/> 
    78         <mkdir dir="components/tmp/tomcat"/> 
    79  
    80         <copy todir="components/tmp/tomcat" overwrite="true"> 
    81             <fileset dir="distributions/web" includes="packages/tomcat/**/*"/> 
    82         </copy> 
    83          
    84         <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" /> 
    85     </target> 
    86          
    87     <target name="compress-tomcat-component"> 
    88         <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/> 
    89     </target> 
    90  
    91     <!-- imagemagick --> 
    92     <target name="prepare-imagemagick-component"> 
    93  
    94         <delete dir="components/tmp/imagemagick"/> 
    95         <mkdir dir="components/tmp/imagemagick"/> 
    96  
    97         <copy todir="components/tmp/imagemagick" overwrite="true"> 
    98             <fileset dir="distributions/web" includes="gs2build/bin/linux/imagemagick/**/*"/> 
    99         </copy> 
    100                  
    101         <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/> 
    102     </target> 
    103          
    104     <target name="compress-imagemagick-component"> 
    105         <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/> 
    106     </target> 
    107  
     22                <antcall target="compress-component"><param name="component" value="core"/></antcall> 
     23                <antcall target="compress-component"><param name="component" value="ant"/></antcall> 
     24                <antcall target="compress-component"><param name="component" value="tomcat"/></antcall> 
     25                <antcall target="compress-component"><param name="component" value="imagemagick"/></antcall> 
     26    </target> 
    10827 
    10928</project>