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 -->
|
---|
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 | </fileset>
|
---|
51 | </copy>
|
---|
52 | <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
|
---|
53 | </target>
|
---|
54 |
|
---|
55 | <target name="compress-core-component">
|
---|
56 | <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
|
---|
57 | </target>
|
---|
58 |
|
---|
59 | <!-- sourcecode -->
|
---|
60 | <target name="prepare-sourcecode-component">
|
---|
61 |
|
---|
62 | <delete dir="components/tmp/sourcecode"/>
|
---|
63 | <mkdir dir="components/tmp/sourcecode"/>
|
---|
64 |
|
---|
65 | <copy todir="components/tmp/sourcecode" overwrite="true">
|
---|
66 | <fileset dir="distributions/web">
|
---|
67 | <include name="common-src/**/*"/>
|
---|
68 | <include name="runtime-src/**/*"/>
|
---|
69 | <include name="build-src/**/*"/>
|
---|
70 | </fileset>
|
---|
71 | </copy>
|
---|
72 |
|
---|
73 | <mkdir dir="products"/>
|
---|
74 | <tar destfile="products/Greenstone-${version}-${os.suffix}-sourcecode-component.tar.gz" basedir="components/tmp/sourcecode" compress="true"/>
|
---|
75 |
|
---|
76 | </target>
|
---|
77 |
|
---|
78 | <target name="compress-sourcecode-component">
|
---|
79 | <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
|
---|
80 | </target>
|
---|
81 |
|
---|
82 | <!-- imagemagick -->
|
---|
83 | <target name="prepare-imagemagick-component">
|
---|
84 |
|
---|
85 | <delete dir="components/tmp/imagemagick"/>
|
---|
86 | <mkdir dir="components/tmp/imagemagick"/>
|
---|
87 |
|
---|
88 | <copy todir="components/tmp/imagemagick" overwrite="true">
|
---|
89 | <fileset dir="distributions/web/bin/linux">
|
---|
90 | <include name="imagemagick/**/*"/>
|
---|
91 | </fileset>
|
---|
92 | </copy>
|
---|
93 |
|
---|
94 | <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
|
---|
95 | </target>
|
---|
96 |
|
---|
97 | <target name="compress-imagemagick-component">
|
---|
98 | <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
|
---|
99 | </target>
|
---|
100 |
|
---|
101 | </project>
|
---|