source: release-kits/wirk3/ant-scripts/create-components.xml@ 17427

Last change on this file since 17427 was 17427, checked in by oranfry, 16 years ago

making targets idempotent

File size: 5.9 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk3-create-components" default="create-components">
3
4 <!-- create components from the distribution folder -->
5 <target name="create-components">
6 <antcall target="create-core-component" />
7 <antcall target="create-imagemagick-component" />
8 <antcall target="create-ghostscript-component" />
9 <antcall target="create-sourcecode-component" />
10 <antcall target="create-ant-component" />
11 <antcall target="create-tomcat-component" />
12 </target>
13
14
15 <target name="create-core-component">
16 <antcall target="prepare-core-component" />
17 <antcall target="compress-core-component" />
18 </target>
19
20 <target name="create-imagemagick-component">
21 <antcall target="prepare-imagemagick-component" />
22 <antcall target="compress-imagemagick-component" />
23 </target>
24
25
26 <target name="create-ghostscript-component">
27 <antcall target="prepare-ghostscript-component" />
28 <antcall target="compress-ghostscript-component" />
29 </target>
30
31
32 <target name="create-sourcecode-component">
33 <antcall target="prepare-sourcecode-component" />
34 <antcall target="compress-sourcecode-component" />
35 </target>
36
37
38 <target name="create-ant-component">
39 <antcall target="prepare-ant-component" />
40 <antcall target="compress-ant-component" />
41 </target>
42
43
44 <target name="create-tomcat-component">
45 <antcall target="prepare-tomcat-component" />
46 <antcall target="compress-tomcat-component" />
47 </target>
48
49
50 <target name="prepare-core-component">
51
52 <!-- delete old stuff to create new components -->
53 <delete dir="components/tmp/core"/>
54 <mkdir dir="components/tmp/core"/>
55
56 <copy todir="components/tmp/core" overwrite="true">
57 <fileset dir="distribution/greenstone3">
58 <include name="**/*"/>
59
60 <!-- exclude ghostscript -->
61 <exclude name="gs2build/bin/windows/ghostscript/**/*"/>
62
63 <!-- exclude imagemagick -->
64 <exclude name="gs2build/bin/windows/imagemagick/**/*"/>
65
66 <!-- exclude sourcecode -->
67 <include name="src/**/*"/>
68 <exclude name="gs2build/common-src/**/*"/>
69 <exclude name="gs2build/build-src/**/*"/>
70 <exclude name="gs2build/runtime-src/**/*"/>
71
72 <!-- exclude ant -->
73 <exclude name="packages/ant/**/*"/>
74
75 <!-- exclude tomcat -->
76 <exclude name="packages/tomcat/**/*"/>
77
78 </fileset>
79 </copy>
80
81 <!-- do some cleanup -->
82 <delete dir="components/tmp/core/gs2build/common-src"/>
83 <delete dir="components/tmp/core/gs2build/build-src"/>
84 <delete dir="components/tmp/core/gs2build/runtime-src"/>
85 <delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
86 <delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>
87
88 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
89 </target>
90
91
92 <target name="compress-core-component">
93 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
94 </target>
95
96
97
98 <target name="prepare-imagemagick-component">
99 <delete dir="components/tmp/imagemagick"/>
100 <mkdir dir="components/tmp/imagemagick"/>
101 <copy todir="components/tmp/imagemagick" overwrite="true">
102 <fileset dir="distribution/greenstone3/gs2build/bin/windows/">
103 <include name="imagemagick/**/*"/>
104 </fileset>
105 </copy>
106
107 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
108 </target>
109
110 <target name="compress-imagemagick-component">
111 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
112 </target>
113
114
115
116 <target name="prepare-ghostscript-component">
117 <delete dir="components/tmp/ghostscript"/>
118 <mkdir dir="components/tmp/ghostscript"/>
119 <copy todir="components/tmp/ghostscript" overwrite="true">
120 <fileset dir="distribution/greenstone3/gs2build/bin/windows/">
121 <include name="ghostscript/**/*"/>
122 </fileset>
123 </copy>
124
125 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
126 </target>
127
128 <target name="compress-ghostscript-component">
129 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
130 </target>
131
132 <target name="prepare-sourcecode-component">
133 <delete dir="components/tmp/sourcecode"/>
134 <mkdir dir="components/tmp/sourcecode"/>
135 <copy todir="components/tmp/sourcecode" overwrite="true">
136 <fileset dir="distribution/greenstone3">
137 <include name="src/**/*"/>
138 <include name="gs2build/common-src/**/*"/>
139 <include name="gs2build/build-src/**/*"/>
140 <include name="gs2build/runtime-src/**/*"/>
141 </fileset>
142 </copy>
143
144 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
145 </target>
146
147 <target name="compress-sourcecode-component">
148 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
149 </target>
150
151 <target name="prepare-ant-component">
152 <delete dir="components/tmp/ant"/>
153 <mkdir dir="components/tmp/ant"/>
154
155 <copy todir="components/tmp/ant" overwrite="true">
156 <fileset dir="distribution/greenstone3/packages">
157 <include name="ant/**/*"/>
158 </fileset>
159 </copy>
160
161 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
162 </target>
163
164 <target name="compress-ant-component">
165 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 ant.lzma ant.comp"/></exec>
166 </target>
167
168
169
170 <target name="prepare-tomcat-component">
171 <delete dir="components/tmp/tomcat"/>
172 <mkdir dir="components/tmp/tomcat"/>
173 <copy todir="components/tmp/tomcat" overwrite="true">
174 <fileset dir="distribution/greenstone3/packages">
175 <include name="tomcat/**/*"/>
176 </fileset>
177 </copy>
178
179 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
180 </target>
181
182 <target name="compress-tomcat-component">
183 <exec executable="7z.exe" dir="components"><arg line="a -t7z -mx=9 tomcat.lzma tomcat.comp"/></exec>
184 </target>
185
186
187
188</project>
Note: See TracBrowser for help on using the repository browser.