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

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

prepare source releases on each os

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
6    <!-- 1st level -->
7    <target name="create-components">
8        <antcall target="prepare-components" />
9        <antcall target="compress-components" />
10    </target>
11
12    <!-- 2nd level -->
13    <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" />
18
19        <antcall target="prepare-sourcecode-component" />
20
21        <antcall target="prepare-source-release" />
22    </target>
23
24    <target name="compress-components">
25        <antcall target="compress-core-component" />
26        <antcall target="compress-ant-component" />
27        <antcall target="compress-tomcat-component" />
28        <antcall target="compress-imagemagick-component" />
29
30        <!--<antcall target="compress-sourcecode-component" />-->
31
32        <antcall target="compress-source-release" />
33    </target>
34
35    <!-- 3rd level -->
36
37    <!-- core -->
38    <target name="prepare-core-component">
39
40        <delete dir="components/tmp/core"/>
41        <mkdir dir="components/tmp/core"/>
42               
43        <copy todir="components/tmp/core" overwrite="true">
44            <fileset dir="distribution/greenstone3">
45                <include name="**/*"/>
46
47                <!-- exclude sourcecode -->
48                <exclude name="src"/>
49                <exclude name="src/**/*"/>
50                <exclude name="gs2build/common-src"/>
51                <exclude name="gs2build/common-src/**/*"/>
52                <exclude name="gs2build/build-src"/>
53                <exclude name="gs2build/build-src/**/*"/>
54                <exclude name="gs2build/runtime-src"/>
55                <exclude name="gs2build/runtime-src/**/*"/>
56                <exclude name="packages/ant"/>
57                <exclude name="packages/ant/**/*"/>
58                <exclude name="packages/tomcat"/>
59                <exclude name="packages/tomcat/**/*"/>
60                <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick"/>
61                <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick/**/*"/>
62
63            </fileset>
64        </copy>
65       
66        <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
67    </target>
68   
69    <target name="compress-core-component">
70        <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
71    </target>
72
73    <!-- sourcecode -->
74    <target name="prepare-sourcecode-component">
75
76        <delete dir="components/tmp/sourcecode"/>
77        <mkdir dir="components/tmp/sourcecode"/>
78
79        <copy todir="components/tmp/sourcecode" overwrite="true">
80                <fileset dir="distribution/greenstone3">
81                    <include name="src/**/*"/>
82                    <include name="gs2build/common-src/**/*"/>
83                    <include name="gs2build/build-src/**/*"/>
84                    <include name="gs2build/runtime-src/**/*"/>
85                </fileset>
86        </copy>
87               
88        <zip destfile="components/Greenstone-${version}-linux-sourcecode.zip"  basedir="components/tmp/sourcecode" compress="true"/>
89    </target>
90       
91    <target name="compress-sourcecode-component">
92        <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
93    </target>
94
95    <!-- ant -->   
96    <target name="prepare-ant-component">
97
98        <delete dir="components/tmp/ant"/>
99        <mkdir dir="components/tmp/ant"/>
100
101        <copy todir="components/tmp/ant" overwrite="true">
102            <fileset dir="distribution/greenstone3/packages">
103                <include name="ant/**/*"/>
104            </fileset>
105        </copy>
106       
107        <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
108    </target>
109       
110    <target name="compress-ant-component">
111        <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
112    </target>
113   
114    <!-- tomcat -->
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    <!-- imagemagick -->
134    <target name="prepare-imagemagick-component">
135
136        <delete dir="components/tmp/imagemagick"/>
137        <mkdir dir="components/tmp/imagemagick"/>
138
139        <copy todir="components/tmp/imagemagick" overwrite="true">
140            <fileset dir="distribution/greenstone3/gs2build/bin/linux">
141                <include name="imagemagick/**/*"/>
142            </fileset>
143        </copy>
144               
145        <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
146    </target>
147       
148    <target name="compress-imagemagick-component">
149        <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
150    </target>
151
152    <target name="compress-source-release">
153        <sevenzip task="encode" input="components/source-release.comp" output="components/source-release.lzma" dictionnary="26"/>
154    </target>
155
156
157</project>
Note: See TracBrowser for help on using the browser.