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

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

don't make the source components of binary zips anymore

File size: 5.0 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-imagemagick-component" />
16 <antcall target="prepare-ghostscript-component" />
17 </target>
18
19 <target name="compress-components">
20 <antcall target="compress-core-component" />
21 <antcall target="compress-imagemagick-component" />
22 <antcall target="compress-ghostscript-component" />
23 </target>
24
25 <!-- 3rd level -->
26 <target name="create-core-component">
27 <antcall target="prepare-core-component" />
28 <antcall target="compress-core-component" />
29 </target>
30
31 <target name="create-sourcecode-component">
32 <antcall target="prepare-sourcecode-component" />
33 <antcall target="compress-sourcecode-component" />
34 </target>
35
36 <!-- core -->
37 <target name="prepare-core-component">
38
39 <delete dir="components/tmp/core"/>
40 <mkdir dir="components/tmp/core"/>
41
42 <copy todir="components/tmp/core" overwrite="true">
43 <fileset dir="distributions/web">
44 <include name="**/*"/>
45
46 <!-- exclude sourcecode + imagemagick + build files -->
47 <exclude name="common-src"/>
48 <exclude name="common-src/**/*"/>
49 <exclude name="runtime-src"/>
50 <exclude name="runtime-src/**/*"/>
51 <exclude name="build-src"/>
52 <exclude name="build-src/**/*"/>
53 <exclude name="bin/darwin/imagemagick"/>
54 <exclude name="bin/darwin/imagemagick/**/*"/>
55 <exclude name="bin/darwin/ghostscript"/>
56 <exclude name="bin/darwin/ghostscript/**/*"/>
57
58 <exclude name="acconfig.h"/>
59 <exclude name="aclocal.m4"/>
60 <exclude name="config.sub"/>
61 <exclude name="configtest.pl"/>
62 <exclude name="configure"/>
63 <exclude name="configure.in"/>
64 <exclude name="install-sh"/>
65 <exclude name="Makefile.in"/>
66 <exclude name="micotest.cpp"/>
67 <exclude name="config.h.in"/>
68 <exclude name="Install.txt"/>
69
70 <exclude name="README*.txt"/>
71 <include name="READMEen.txt"/>
72
73
74 </fileset>
75 </copy>
76 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
77 </target>
78
79 <target name="compress-core-component">
80 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
81 </target>
82
83 <!-- sourcecode -->
84 <target name="prepare-sourcecode-component">
85
86 <delete dir="components/tmp/sourcecode"/>
87 <mkdir dir="components/tmp/sourcecode"/>
88
89 <exec dir="${basedir}" executable="cp">
90 <arg line="-r distributions/web/common-src distributions/web/build-src distributions/web/runtime-src components/tmp/sourcecode"/>
91 </exec>
92 <exec dir="distributions/web" executable="cp">
93 <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"/>
94 </exec>
95
96 <mkdir dir="products"/>
97
98 <!-- create a script to create the tar -->
99 <echo output="create-sourcecode-component.sh">
100 tar -czf ../../../products/Greenstone-${version}-${os.suffix}-sourcecode-component.tar.gz *
101 </echo>
102 <chmod perm="+x" file="create-sourcecode-component.sh"/>
103
104 <!-- run it -->
105 <exec dir="components/tmp/sourcecode" executable="/bin/bash">
106 <arg line="${basedir}/create-sourcecode-component.sh"/>
107 </exec>
108
109 <!-- remove it -->
110 <delete file="create-sourcecode-component.sh"/>
111
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 <!-- imagemagick -->
119 <target name="prepare-imagemagick-component">
120
121 <delete dir="components/tmp/imagemagick"/>
122 <mkdir dir="components/tmp/imagemagick"/>
123
124 <copy todir="components/tmp/imagemagick" overwrite="true">
125 <fileset dir="distributions/web/bin/darwin">
126 <include name="imagemagick/**/*"/>
127 </fileset>
128 </copy>
129
130 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
131 </target>
132
133 <target name="compress-imagemagick-component">
134 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
135 </target>
136
137 <!-- ghostscript -->
138 <target name="prepare-ghostscript-component">
139
140 <delete dir="components/tmp/ghostscript"/>
141 <mkdir dir="components/tmp/ghostscript"/>
142
143 <copy todir="components/tmp/ghostscript" overwrite="true">
144 <fileset dir="distributions/web/bin/darwin">
145 <include name="ghostscript/**/*"/>
146 </fileset>
147 </copy>
148
149 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" includes="**/*"/>
150 </target>
151
152 <target name="compress-ghostscript-component">
153 <sevenzip task="encode" input="components/ghostscript.comp" output="components/ghostscript.lzma" dictionnary="26"/>
154 </target>
155
156</project>
Note: See TracBrowser for help on using the repository browser.