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

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

kept Support.htm out of all distributions, and moved Install.txt from core component to sourcecode component

File size: 4.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 </target>
11
12 <!-- 2nd level -->
13 <target name="prepare-components">
14 <antcall target="prepare-core-component" />
15 <antcall target="prepare-imagemagick-component" />
16
17 <antcall target="prepare-sourcecode-component" />
18
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.sub"/>
53 <exclude name="configtest.pl"/>
54 <exclude name="configure"/>
55 <exclude name="configure.in"/>
56 <exclude name="install-sh"/>
57 <exclude name="Makefile.in"/>
58 <exclude name="micotest.cpp"/>
59 <exclude name="config.h.in"/>
60 <exclude name="Install.txt"/>
61
62 <exclude name="README*.txt"/>
63 <include name="READMEen.txt"/>
64
65 </fileset>
66 </copy>
67 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
68 </target>
69
70 <target name="compress-core-component">
71 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
72 </target>
73
74 <!-- sourcecode -->
75 <target name="prepare-sourcecode-component">
76
77 <delete dir="components/tmp/sourcecode"/>
78 <mkdir dir="components/tmp/sourcecode"/>
79
80 <exec dir="${basedir}" executable="cp">
81 <arg line="-r distributions/web/common-src distributions/web/build-src distributions/web/runtime-src components/tmp/sourcecode"/>
82 </exec>
83 <exec dir="distributions/web" executable="cp">
84 <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"/>
85 </exec>
86
87 <mkdir dir="products"/>
88 <!-- create a script to create the tar -->
89 <echo output="create-sourcecode-component.sh">
90 tar -czf ../../../products/Greenstone-${version}-${os.suffix}-sourcecode-component.tar.gz *
91 </echo>
92 <chmod perm="+x" file="create-sourcecode-component.sh"/>
93
94 <!-- run it -->
95 <exec dir="components/tmp/sourcecode" executable="/bin/bash">
96 <arg line="${basedir}/create-sourcecode-component.sh"/>
97 </exec>
98
99 <!-- remove it -->
100 <delete file="create-sourcecode-component.sh"/>
101
102 </target>
103
104 <target name="compress-sourcecode-component">
105 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
106 </target>
107
108 <!-- imagemagick -->
109 <target name="prepare-imagemagick-component">
110
111 <delete dir="components/tmp/imagemagick"/>
112 <mkdir dir="components/tmp/imagemagick"/>
113
114 <copy todir="components/tmp/imagemagick" overwrite="true">
115 <fileset dir="distributions/web/bin/linux">
116 <include name="imagemagick/**/*"/>
117 </fileset>
118 </copy>
119
120 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
121 </target>
122
123 <target name="compress-imagemagick-component">
124 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
125 </target>
126
127</project>
Note: See TracBrowser for help on using the repository browser.