source: release-kits/lirk2/ant-scripts/create-components.xml@ 18767

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

changed the naming convention of cdrom component archives

File size: 6.2 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk2-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 <antcall target="produce-cd-components"/>
11 </target>
12
13 <!-- 2nd level -->
14 <target name="prepare-components">
15 <antcall target="prepare-core-component" />
16 <antcall target="prepare-imagemagick-component" />
17
18 <antcall target="prepare-sourcecode-component" />
19 </target>
20
21 <target name="compress-components">
22 <antcall target="compress-core-component" />
23 <antcall target="compress-imagemagick-component" />
24
25 <antcall target="compress-zipped-binary-release" /> <!-- from init -->
26 </target>
27
28 <!-- 3rd level -->
29
30 <!-- core -->
31 <target name="prepare-core-component">
32
33 <delete dir="components/tmp/core"/>
34 <mkdir dir="components/tmp/core"/>
35
36 <copy todir="components/tmp/core" overwrite="true">
37 <fileset dir="distributions/web">
38 <include name="**/*"/>
39
40 <!-- exclude sourcecode + imagemagick + build files -->
41 <exclude name="common-src"/>
42 <exclude name="common-src/**/*"/>
43 <exclude name="runtime-src"/>
44 <exclude name="runtime-src/**/*"/>
45 <exclude name="build-src"/>
46 <exclude name="build-src/**/*"/>
47 <exclude name="bin/linux/imagemagick"/>
48 <exclude name="bin/linux/imagemagick/**/*"/>
49
50 <exclude name="acconfig.h"/>
51 <exclude name="aclocal.m4"/>
52 <exclude name="config.guess"/>
53 <exclude name="config.sub"/>
54 <exclude name="configtest.pl"/>
55 <exclude name="configure"/>
56 <exclude name="configure.in"/>
57 <exclude name="install-sh"/>
58 <exclude name="Makefile.in"/>
59 <exclude name="micotest.cpp"/>
60 <exclude name="config.h.in"/>
61 <exclude name="Install.txt"/>
62
63 <exclude name="README*.txt"/>
64 <include name="READMEen.txt"/>
65
66 </fileset>
67 </copy>
68 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
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 -->
76 <target name="prepare-sourcecode-component">
77
78 <delete dir="components/tmp/sourcecode"/>
79 <mkdir dir="components/tmp/sourcecode"/>
80
81 <exec dir="${basedir}" executable="cp">
82 <arg line="-r distributions/web/common-src distributions/web/build-src distributions/web/runtime-src components/tmp/sourcecode"/>
83 </exec>
84 <exec dir="distributions/web" executable="cp">
85 <arg line="acconfig.h aclocal.m4 config.guess config.sub configtest.pl configure configure.in install-sh Makefile.in micotest.cpp config.h.in Install.txt ${basedir}/components/tmp/sourcecode"/>
86 </exec>
87
88 <mkdir dir="products"/>
89 <!-- create a script to create the tar -->
90 <echo output="create-sourcecode-component.sh">
91 tar -czf ../../../products/Greenstone-${version}-${os.suffix}-sourcecode-component.tar.gz *
92 </echo>
93 <chmod perm="+x" file="create-sourcecode-component.sh"/>
94
95 <!-- run it -->
96 <exec dir="components/tmp/sourcecode" executable="/bin/bash">
97 <arg line="${basedir}/create-sourcecode-component.sh"/>
98 </exec>
99
100 <!-- remove it -->
101 <delete file="create-sourcecode-component.sh"/>
102
103 </target>
104
105 <target name="compress-sourcecode-component">
106 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
107 </target>
108
109 <!-- imagemagick -->
110 <target name="prepare-imagemagick-component">
111
112 <delete dir="components/tmp/imagemagick"/>
113 <mkdir dir="components/tmp/imagemagick"/>
114
115 <copy todir="components/tmp/imagemagick" overwrite="true">
116 <fileset dir="distributions/web/bin/linux">
117 <include name="imagemagick/**/*"/>
118 </fileset>
119 </copy>
120
121 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
122 </target>
123
124 <target name="compress-imagemagick-component">
125 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
126 </target>
127
128 <!--
129 cd components
130 produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
131 split components into linux only files (linux) and general files (all)
132 -->
133 <target name="produce-cd-components">
134 <delete dir="components/tmp/cdrom"/>
135 <mkdir dir="components/tmp/cdrom"/>
136
137 <!-- core -->
138 <mkdir dir="components/tmp/cdrom/core/all"/>
139 <mkdir dir="components/tmp/cdrom/core/linux"/>
140 <copy todir="components/tmp/cdrom/core/all" overwrite="true">
141 <fileset dir="components/tmp/core"/>
142 </copy>
143 <move todir="components/tmp/cdrom/core/linux" overwrite="true">
144 <fileset dir="components/tmp/cdrom/core/all">
145 <include name="bin/linux"/>
146 <include name="bin/linux/**/*"/>
147 <include name="bin/windows"/>
148 <include name="bin/windows/**/*"/>
149 <include name="apache-httpd/linux"/>
150 <include name="apache-httpd/linux/**/*"/>
151 <include name="*.sh"/>
152 <include name="*.csh"/>
153 <include name="*.bash"/>
154 </fileset>
155 </move>
156
157 <!-- imagemagick (all linux specific) -->
158 <mkdir dir="components/tmp/cdrom/imagemagick/linux"/>
159 <copy todir="components/tmp/cdrom/imagemagick/linux" overwrite="true">
160 <fileset dir="components/tmp/imagemagick"/>
161 </copy>
162
163
164 <!-- sourcecode -->
165 <mkdir dir="components/tmp/cdrom/sourcecode/all"/>
166 <mkdir dir="components/tmp/cdrom/sourcecode/linux"/>
167 <copy todir="components/tmp/cdrom/sourcecode/all" overwrite="true">
168 <fileset dir="components/tmp/sourcecode"/>
169 </copy>
170 <move todir="components/tmp/cdrom/sourcecode/linux" overwrite="true">
171 <fileset dir="components/tmp/cdrom/sourcecode/all">
172 <include name="acconfig.h"/>
173 <include name="aclocal.m4"/>
174 <include name="config.guess"/>
175 <include name="config.sub"/>
176 <include name="configtest.pl"/>
177 <include name="configure"/>
178 <include name="configure.in"/>
179 <include name="install-sh"/>
180 <include name="Makefile.in"/>
181 <include name="micotest.cpp"/>
182 <include name="config.h.in"/>
183 </fileset>
184 </move>
185
186 <tar destfile="products/cdrom-components-${version}-linux.tar.gz" basedir="components/tmp/cdrom" compression="gzip"/>
187
188 </target>
189
190</project>
Note: See TracBrowser for help on using the repository browser.