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

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

standardized these files

File size: 5.7 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 <exclude name="packages/ant"/>
53 <exclude name="packages/ant/**/*"/>
54 <exclude name="packages/tomcat"/>
55 <exclude name="packages/tomcat/**/*"/>
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 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
63 </target>
64
65 <target name="compress-core-component">
66 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
67 </target>
68
69 <!-- sourcecode-core -->
70 <target name="prepare-sourcecode-core-component">
71 <delete dir="components/tmp/sourcecode-core"/>
72 <mkdir dir="components/tmp/sourcecode-core"/>
73
74 <copy todir="components/tmp/sourcecode-core" overwrite="true">
75 <fileset dir="distribution/source">
76 <include name="gli/**/*"/>
77 <include name="docs/**/*"/>
78 <include name="resources/**/*"/>
79 <include name="web/**/*"/>
80 <include name="gs2build/etc/**/*"/>
81 <include name="gs2build/setup.bash"/>
82 <include name="build.xml"/>
83 <include name="build.properties"/>
84 <include name="*.sh"/>
85 <include name="*.txt"/>
86 </fileset>
87 </copy>
88 <zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
89 </target>
90
91 <target name="compress-sourcecode-core-component">
92 <sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
93 </target>
94
95 <!-- sourcecode -->
96 <target name="prepare-sourcecode-component">
97
98 <delete dir="components/tmp/sourcecode"/>
99 <mkdir dir="components/tmp/sourcecode"/>
100
101 <copy todir="components/tmp/sourcecode" overwrite="true">
102 <fileset dir="distribution/greenstone3">
103 <include name="src/**/*"/>
104 <include name="gs2build/common-src/**/*"/>
105 <include name="gs2build/build-src/**/*"/>
106 <include name="gs2build/runtime-src/**/*"/>
107 </fileset>
108 </copy>
109
110 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
111 </target>
112
113 <target name="compress-sourcecode-component">
114 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
115 </target>
116
117 <!-- ant -->
118 <target name="prepare-ant-component">
119
120 <delete dir="components/tmp/ant"/>
121 <mkdir dir="components/tmp/ant"/>
122
123 <copy todir="components/tmp/ant" overwrite="true">
124 <fileset dir="distribution/greenstone3/packages">
125 <include name="ant/**/*"/>
126 </fileset>
127 </copy>
128
129 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
130 </target>
131
132 <target name="compress-ant-component">
133 <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
134 </target>
135
136 <!-- tomcat -->
137 <target name="prepare-tomcat-component">
138
139 <delete dir="components/tmp/tomcat"/>
140 <mkdir dir="components/tmp/tomcat"/>
141
142 <copy todir="components/tmp/tomcat" overwrite="true">
143 <fileset dir="distribution/greenstone3/packages">
144 <include name="tomcat/**/*"/>
145 </fileset>
146 </copy>
147
148 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
149 </target>
150
151 <target name="compress-tomcat-component">
152 <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
153 </target>
154
155 <!-- imagemagick -->
156 <target name="prepare-imagemagick-component">
157
158 <delete dir="components/tmp/imagemagick"/>
159 <mkdir dir="components/tmp/imagemagick"/>
160
161 <copy todir="components/tmp/imagemagick" overwrite="true">
162 <fileset dir="distribution/greenstone3/gs2build/bin/linux">
163 <include name="imagemagick/**/*"/>
164 </fileset>
165 </copy>
166
167 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
168 </target>
169
170 <target name="compress-imagemagick-component">
171 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
172 </target>
173
174</project>
Note: See TracBrowser for help on using the repository browser.