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

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

exclude all readmes but the english one from binary installer

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