source: release-kits/mark2/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.2 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark2-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-sourcecode-core-component" />
17 <antcall target="prepare-imagemagick-component" />
18 <antcall target="prepare-ghostscript-component" />
19 </target>
20
21 <target name="compress-components">
22 <antcall target="compress-core-component" />
23 <antcall target="compress-sourcecode-component" />
24 <antcall target="compress-sourcecode-core-component" />
25 <antcall target="compress-imagemagick-component" />
26 <antcall target="compress-ghostscript-component" />
27 </target>
28
29 <!-- 3rd level -->
30 <target name="create-core-component">
31 <antcall target="prepare-core-component" />
32 <antcall target="compress-core-component" />
33 </target>
34
35 <target name="create-sourcecode-component">
36 <antcall target="prepare-sourcecode-component" />
37 <antcall target="compress-sourcecode-component" />
38 </target>
39
40 <!-- core -->
41 <target name="prepare-core-component">
42
43 <delete dir="components/tmp/core"/>
44 <mkdir dir="components/tmp/core"/>
45
46 <copy todir="components/tmp/core" overwrite="true">
47 <fileset dir="distributions/web">
48 <include name="**/*"/>
49
50 <!-- exclude sourcecode + imagemagick -->
51 <exclude name="common-src"/>
52 <exclude name="common-src/**/*"/>
53 <exclude name="runtime-src"/>
54 <exclude name="runtime-src/**/*"/>
55 <exclude name="build-src"/>
56 <exclude name="build-src/**/*"/>
57 <exclude name="bin/darwin/imagemagick"/>
58 <exclude name="bin/darwin/imagemagick/**/*"/>
59 <exclude name="bin/darwin/ghostscript"/>
60 <exclude name="bin/darwin/ghostscript/**/*"/>
61
62 </fileset>
63 </copy>
64 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
65 </target>
66
67 <target name="compress-core-component">
68 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
69 </target>
70
71 <!-- sourcecode core -->
72 <target name="prepare-sourcecode-core-component">
73 <delete dir="components/tmp/sourcecode-core"/>
74 <mkdir dir="components/tmp/sourcecode-core"/>
75
76 <copy todir="components/tmp/sourcecode-core" overwrite="true">
77 <fileset dir="distributions/source">
78 <include name="macros/**/*"/>
79 <include name="images/**/*"/>
80 <include name="etc/**/*"/>
81 <include name="gli/**/*"/>
82 <include name="collect/**/*"/>
83 <include name="doc/**/*"/>
84 <include name="setup.bash"/>
85 </fileset>
86 </copy>
87 <zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false" includes="**/*"/>
88 </target>
89
90 <target name="compress-sourcecode-core-component">
91 <sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
92 </target>
93
94 <!-- sourcecode -->
95 <target name="prepare-sourcecode-component">
96
97 <delete dir="components/tmp/sourcecode"/>
98 <mkdir dir="components/tmp/sourcecode"/>
99
100 <copy todir="components/tmp/sourcecode" overwrite="true">
101 <fileset dir="distributions/web">
102 <include name="common-src/**/*"/>
103 <include name="runtime-src/**/*"/>
104 <include name="build-src/**/*"/>
105 </fileset>
106 </copy>
107
108 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
109 <zip destfile="components/Greenstone-${version}-MacOS-${processor}-sourcecode.zip" basedir="components/tmp/sourcecode" compress="true"/>
110 </target>
111
112 <target name="compress-sourcecode-component">
113 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
114 </target>
115
116 <!-- imagemagick -->
117 <target name="prepare-imagemagick-component">
118
119 <delete dir="components/tmp/imagemagick"/>
120 <mkdir dir="components/tmp/imagemagick"/>
121
122 <copy todir="components/tmp/imagemagick" overwrite="true">
123 <fileset dir="distributions/web/bin/darwin">
124 <include name="imagemagick/**/*"/>
125 </fileset>
126 </copy>
127
128 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
129 </target>
130
131 <target name="compress-imagemagick-component">
132 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
133 </target>
134
135 <!-- ghostscript -->
136 <target name="prepare-ghostscript-component">
137
138 <delete dir="components/tmp/ghostscript"/>
139 <mkdir dir="components/tmp/ghostscript"/>
140
141 <copy todir="components/tmp/ghostscript" overwrite="true">
142 <fileset dir="distributions/web/bin/darwin">
143 <include name="ghostscript/**/*"/>
144 </fileset>
145 </copy>
146
147 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" includes="**/*"/>
148 </target>
149
150 <target name="compress-ghostscript-component">
151 <sevenzip task="encode" input="components/ghostscript.comp" output="components/ghostscript.lzma" dictionnary="26"/>
152 </target>
153
154</project>
Note: See TracBrowser for help on using the repository browser.