source: release-kits/lirk3/ant-scripts/create-components.xml@ 17659

Last change on this file since 17659 was 17659, checked in by oranfry, 15 years ago

standardized these files

File size: 5.8 KB
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-sourcecode-component" />
16 <antcall target="prepare-ant-component" />
17 <antcall target="prepare-tomcat-component" />
18 <antcall target="prepare-imagemagick-component" />
19 <antcall target="prepare-sourcecode-core-component" />
20 </target>
21
22 <target name="compress-components">
23 <antcall target="compress-core-component" />
24 <antcall target="compress-sourcecode-component" />
25 <antcall target="compress-ant-component" />
26 <antcall target="compress-tomcat-component" />
27 <antcall target="compress-imagemagick-component" />
28 <antcall target="compress-sourcecode-core-component" />
29 </target>
30
31 <!-- 3rd level -->
32
33 <!-- core -->
34 <target name="prepare-core-component">
35
36 <delete dir="components/tmp/core"/>
37 <mkdir dir="components/tmp/core"/>
38
39 <copy todir="components/tmp/core" overwrite="true">
40 <fileset dir="distribution/greenstone3">
41 <include name="**/*"/>
42
43 <!-- exclude sourcecode -->
44 <exclude name="src"/>
45 <exclude name="src/**/*"/>
46 <exclude name="gs2build/common-src"/>
47 <exclude name="gs2build/common-src/**/*"/>
48 <exclude name="gs2build/build-src"/>
49 <exclude name="gs2build/build-src/**/*"/>
50 <exclude name="gs2build/runtime-src"/>
51 <exclude name="gs2build/runtime-src/**/*"/>
52
53 <!-- exclude ant -->
54 <exclude name="packages/ant"/>
55 <exclude name="packages/ant/**/*"/>
56
57 <!-- exclude tomcat -->
58 <exclude name="packages/tomcat"/>
59 <exclude name="packages/tomcat/**/*"/>
60
61 <!-- exclude imagemagick -->
62 <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick"/>
63 <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick/**/*"/>
64
65 </fileset>
66 </copy>
67
68 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
69 </target>
70
71 <target name="compress-core-component">
72 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
73 </target>
74
75 <!-- sourcecode-core -->
76 <target name="prepare-sourcecode-core-component">
77 <delete dir="components/tmp/sourcecode-core"/>
78 <mkdir dir="components/tmp/sourcecode-core"/>
79
80 <copy todir="components/tmp/sourcecode-core" overwrite="true">
81 <fileset dir="distribution/source">
82 <include name="gli/**/*"/>
83 <include name="docs/**/*"/>
84 <include name="resources/**/*"/>
85 <include name="web/**/*"/>
86 <include name="gs2build/etc/**/*"/>
87 <include name="gs2build/setup.bash"/>
88 <include name="build.xml"/>
89 <include name="build.properties"/>
90 <include name="*.sh"/>
91 <include name="*.txt"/>
92 </fileset>
93 </copy>
94 <zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
95 </target>
96
97 <target name="compress-sourcecode-core-component">
98 <sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
99 </target>
100
101 <!-- sourcecode -->
102 <target name="prepare-sourcecode-component">
103
104 <delete dir="components/tmp/sourcecode"/>
105 <mkdir dir="components/tmp/sourcecode"/>
106
107 <copy todir="components/tmp/sourcecode" overwrite="true">
108 <fileset dir="distribution/greenstone3">
109 <include name="src/**/*"/>
110 <include name="gs2build/common-src/**/*"/>
111 <include name="gs2build/build-src/**/*"/>
112 <include name="gs2build/runtime-src/**/*"/>
113 </fileset>
114 </copy>
115
116 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
117 </target>
118
119 <target name="compress-sourcecode-component">
120 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
121 </target>
122
123 <!-- ant -->
124 <target name="prepare-ant-component">
125
126 <delete dir="components/tmp/ant"/>
127 <mkdir dir="components/tmp/ant"/>
128
129 <copy todir="components/tmp/ant" overwrite="true">
130 <fileset dir="distribution/greenstone3/packages">
131 <include name="ant/**/*"/>
132 </fileset>
133 </copy>
134
135 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
136 </target>
137
138 <target name="compress-ant-component">
139 <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
140 </target>
141
142 <!-- tomcat -->
143 <target name="prepare-tomcat-component">
144
145 <delete dir="components/tmp/tomcat"/>
146 <mkdir dir="components/tmp/tomcat"/>
147
148 <copy todir="components/tmp/tomcat" overwrite="true">
149 <fileset dir="distribution/greenstone3/packages">
150 <include name="tomcat/**/*"/>
151 </fileset>
152 </copy>
153
154 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
155 </target>
156
157 <target name="compress-tomcat-component">
158 <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
159 </target>
160
161 <!-- imagemagick -->
162 <target name="prepare-imagemagick-component">
163
164 <delete dir="components/tmp/imagemagick"/>
165 <mkdir dir="components/tmp/imagemagick"/>
166
167 <copy todir="components/tmp/imagemagick" overwrite="true">
168 <fileset dir="distribution/greenstone3/gs2build/bin/linux">
169 <include name="imagemagick/**/*"/>
170 </fileset>
171 </copy>
172
173 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
174 </target>
175
176 <target name="compress-imagemagick-component">
177 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
178 </target>
179
180</project>
Note: See TracBrowser for help on using the repository browser.