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

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

the improved way of creating the source component, this time for mac

File size: 4.5 KB
RevLine 
[17423]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 -->
[17652]5
6 <!-- 1st level -->
[17423]7 <target name="create-components">
[17652]8 <antcall target="prepare-components" />
9 <antcall target="compress-components" />
[17423]10 </target>
[17652]11
12 <!-- 2nd level -->
13 <target name="prepare-components">
14 <antcall target="prepare-core-component" />
[17663]15 <antcall target="prepare-imagemagick-component" />
16 <antcall target="prepare-ghostscript-component" />
[17786]17
[17814]18 <antcall target="prepare-sourcecode-component" />
19
[17652]20 </target>
[17423]21
[17652]22 <target name="compress-components">
23 <antcall target="compress-core-component" />
[17663]24 <antcall target="compress-imagemagick-component" />
25 <antcall target="compress-ghostscript-component" />
[17786]26
[17956]27 <antcall target="compress-zipped-binary-release" /> <!-- from init -->
[17652]28 </target>
29
30 <!-- 3rd level -->
[17423]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
[17659]41 <!-- core -->
[17423]42 <target name="prepare-core-component">
[17453]43
44 <delete dir="components/tmp/core"/>
[17423]45 <mkdir dir="components/tmp/core"/>
[17453]46
[17423]47 <copy todir="components/tmp/core" overwrite="true">
48 <fileset dir="distributions/web">
49 <include name="**/*"/>
50
[17659]51 <!-- exclude sourcecode + imagemagick -->
[17652]52 <exclude name="common-src"/>
[17423]53 <exclude name="common-src/**/*"/>
[17652]54 <exclude name="runtime-src"/>
[17423]55 <exclude name="runtime-src/**/*"/>
[17652]56 <exclude name="build-src"/>
[17423]57 <exclude name="build-src/**/*"/>
[17660]58 <exclude name="bin/darwin/imagemagick"/>
59 <exclude name="bin/darwin/imagemagick/**/*"/>
[17707]60 <exclude name="bin/darwin/ghostscript"/>
61 <exclude name="bin/darwin/ghostscript/**/*"/>
[17423]62
63 </fileset>
64 </copy>
65 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
66 </target>
67
68 <target name="compress-core-component">
69 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
70 </target>
[17659]71
72 <!-- sourcecode -->
[17423]73 <target name="prepare-sourcecode-component">
[17453]74
75 <delete dir="components/tmp/sourcecode"/>
[17423]76 <mkdir dir="components/tmp/sourcecode"/>
[17453]77
[17423]78 <copy todir="components/tmp/sourcecode" overwrite="true">
79 <fileset dir="distributions/web">
80 <include name="common-src/**/*"/>
81 <include name="runtime-src/**/*"/>
82 <include name="build-src/**/*"/>
83 </fileset>
84 </copy>
85
[17956]86 <mkdir dir="products"/>
[18002]87
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"/>
[17981]97 </exec>
[18002]98
99 <!-- remove it -->
100 <delete file="create-sourcecode-component.sh"/>
101
[17423]102 </target>
[17659]103
[17423]104 <target name="compress-sourcecode-component">
105 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
106 </target>
[17652]107
[17659]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">
[17660]115 <fileset dir="distributions/web/bin/darwin">
[17659]116 <include name="imagemagick/**/*"/>
[17652]117 </fileset>
118 </copy>
[17659]119
120 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
[17652]121 </target>
[17659]122
123 <target name="compress-imagemagick-component">
124 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
[17652]125 </target>
[17707]126
[17663]127 <!-- ghostscript -->
128 <target name="prepare-ghostscript-component">
129
130 <delete dir="components/tmp/ghostscript"/>
131 <mkdir dir="components/tmp/ghostscript"/>
132
133 <copy todir="components/tmp/ghostscript" overwrite="true">
134 <fileset dir="distributions/web/bin/darwin">
135 <include name="ghostscript/**/*"/>
136 </fileset>
137 </copy>
138
139 <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" includes="**/*"/>
140 </target>
141
142 <target name="compress-ghostscript-component">
143 <sevenzip task="encode" input="components/ghostscript.comp" output="components/ghostscript.lzma" dictionnary="26"/>
144 </target>
145
[17423]146</project>
Note: See TracBrowser for help on using the repository browser.