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

Last change on this file since 19396 was 19396, checked in by oranfry, 12 years ago

don't make the source components of binary zips anymore

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