root/release-kits/lirk3/ant-scripts/create-components.xml @ 17645

Revision 17645, 4.9 KB (checked in by oranfry, 11 years ago)

cleanup stray zipfiles, and the new imagemagick component

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-create-components" default="create-components">
3
4    <!-- create components from the distribution folder -->
5    <target name="create-components">
6        <antcall target="prepare-components" />
7        <antcall target="compress-components" />
8    </target>
9
10    <target name="prepare-components">
11        <antcall target="prepare-core-component" />
12        <antcall target="prepare-sourcecode-component" />
13        <antcall target="prepare-ant-component" />
14        <antcall target="prepare-tomcat-component" />
15        <antcall target="prepare-imagemagick-component" />
16
17    </target>
18
19    <target name="compress-components">
20        <antcall target="compress-core-component" />
21        <antcall target="compress-sourcecode-component" /> 
22        <antcall target="compress-ant-component" />
23        <antcall target="compress-tomcat-component" />
24        <antcall target="compress-imagemagick-component" />
25    </target>
26
27   
28    <target name="prepare-core-component">
29
30        <delete dir="components/tmp/core"/>
31        <mkdir dir="components/tmp/core"/>
32               
33        <copy todir="components/tmp/core" overwrite="true">
34            <fileset dir="distribution/greenstone3">
35                <include name="**/*"/>
36
37                <!-- exclude sourcecode -->
38                <exclude name="src"/>
39                <exclude name="src/**/*"/>
40                <exclude name="gs2build/common-src"/>
41                <exclude name="gs2build/common-src/**/*"/>
42                <exclude name="gs2build/build-src"/>
43                <exclude name="gs2build/build-src/**/*"/>
44                <exclude name="gs2build/runtime-src"/>
45                <exclude name="gs2build/runtime-src/**/*"/>
46               
47                <!-- exclude ant -->
48                <exclude name="packages/ant"/>
49                <exclude name="packages/ant/**/*"/>
50
51                <!-- exclude tomcat -->
52                <exclude name="packages/tomcat"/>
53                <exclude name="packages/tomcat/**/*"/>
54               
55                <!-- exclude imagemagick -->
56                <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick"/>
57                <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick/**/*"/>
58
59            </fileset>
60        </copy>
61       
62        <!-- do some cleanup -->
63<!--        <delete dir="components/tmp/core/gs2build/common-src"/>
64        <delete dir="components/tmp/core/gs2build/build-src"/>
65        <delete dir="components/tmp/core/gs2build/runtime-src"/>
66        <delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
67        <delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>-->
68               
69        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
70    </target>
71   
72    <target name="compress-core-component">
73        <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
74    </target>
75   
76    <target name="prepare-sourcecode-component">
77
78        <delete dir="components/tmp/sourcecode"/>
79        <mkdir dir="components/tmp/sourcecode"/>
80
81        <copy todir="components/tmp/sourcecode" overwrite="true">
82                <fileset dir="distribution/greenstone3">
83                    <include name="src/**/*"/>
84                    <include name="gs2build/common-src/**/*"/>
85                    <include name="gs2build/build-src/**/*"/>
86                    <include name="gs2build/runtime-src/**/*"/>
87                </fileset>
88        </copy>
89               
90        <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
91    </target>
92       
93    <target name="compress-sourcecode-component">
94        <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
95    </target>
96   
97    <target name="prepare-ant-component">
98
99        <delete dir="components/tmp/ant"/>
100        <mkdir dir="components/tmp/ant"/>
101
102        <copy todir="components/tmp/ant" overwrite="true">
103            <fileset dir="distribution/greenstone3/packages">
104                <include name="ant/**/*"/>
105            </fileset>
106        </copy>
107       
108        <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
109    </target>
110       
111    <target name="compress-ant-component">
112        <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
113    </target>
114   
115    <target name="prepare-tomcat-component">
116
117        <delete dir="components/tmp/tomcat"/>
118        <mkdir dir="components/tmp/tomcat"/>
119
120        <copy todir="components/tmp/tomcat" overwrite="true">
121            <fileset dir="distribution/greenstone3/packages">
122                <include name="tomcat/**/*"/>
123            </fileset>
124        </copy>
125       
126        <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
127    </target>
128       
129    <target name="compress-tomcat-component">
130        <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
131    </target>
132
133    <target name="prepare-imagemagick-component">
134
135        <delete dir="components/tmp/imagemagick"/>
136        <mkdir dir="components/tmp/imagemagick"/>
137
138        <copy todir="components/tmp/imagemagick" overwrite="true">
139            <fileset dir="distribution/greenstone3/gs2build/bin/linux">
140                <include name="imagemagick/**/*"/>
141            </fileset>
142        </copy>
143               
144        <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
145    </target>
146       
147    <target name="compress-imagemagick-component">
148        <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
149    </target>
150   
151</project>
Note: See TracBrowser for help on using the browser.