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

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

gave each sourcecode component zip a unique name

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 <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"/>
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 <zip destfile="components/Greenstone-${version}-linux-sourcecode.zip" basedir="components/tmp/sourcecode" compress="true"/>
112 </target>
113
114 <target name="compress-sourcecode-component">
115 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
116 </target>
117
118 <!-- ant -->
119 <target name="prepare-ant-component">
120
121 <delete dir="components/tmp/ant"/>
122 <mkdir dir="components/tmp/ant"/>
123
124 <copy todir="components/tmp/ant" overwrite="true">
125 <fileset dir="distribution/greenstone3/packages">
126 <include name="ant/**/*"/>
127 </fileset>
128 </copy>
129
130 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
131 </target>
132
133 <target name="compress-ant-component">
134 <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
135 </target>
136
137 <!-- tomcat -->
138 <target name="prepare-tomcat-component">
139
140 <delete dir="components/tmp/tomcat"/>
141 <mkdir dir="components/tmp/tomcat"/>
142
143 <copy todir="components/tmp/tomcat" overwrite="true">
144 <fileset dir="distribution/greenstone3/packages">
145 <include name="tomcat/**/*"/>
146 </fileset>
147 </copy>
148
149 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
150 </target>
151
152 <target name="compress-tomcat-component">
153 <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
154 </target>
155
156 <!-- imagemagick -->
157 <target name="prepare-imagemagick-component">
158
159 <delete dir="components/tmp/imagemagick"/>
160 <mkdir dir="components/tmp/imagemagick"/>
161
162 <copy todir="components/tmp/imagemagick" overwrite="true">
163 <fileset dir="distribution/greenstone3/gs2build/bin/linux">
164 <include name="imagemagick/**/*"/>
165 </fileset>
166 </copy>
167
168 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
169 </target>
170
171 <target name="compress-imagemagick-component">
172 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
173 </target>
174
175</project>
Note: See TracBrowser for help on using the repository browser.