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
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" />
[17652]17 </target>
[17423]18
[17652]19 <target name="compress-components">
20 <antcall target="compress-core-component" />
[17663]21 <antcall target="compress-imagemagick-component" />
22 <antcall target="compress-ghostscript-component" />
[17652]23 </target>
24
25 <!-- 3rd level -->
[17423]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
[17659]36 <!-- core -->
[17423]37 <target name="prepare-core-component">
[17453]38
39 <delete dir="components/tmp/core"/>
[17423]40 <mkdir dir="components/tmp/core"/>
[17453]41
[17423]42 <copy todir="components/tmp/core" overwrite="true">
43 <fileset dir="distributions/web">
44 <include name="**/*"/>
45
[18005]46 <!-- exclude sourcecode + imagemagick + build files -->
[17652]47 <exclude name="common-src"/>
[17423]48 <exclude name="common-src/**/*"/>
[17652]49 <exclude name="runtime-src"/>
[17423]50 <exclude name="runtime-src/**/*"/>
[17652]51 <exclude name="build-src"/>
[17423]52 <exclude name="build-src/**/*"/>
[17660]53 <exclude name="bin/darwin/imagemagick"/>
54 <exclude name="bin/darwin/imagemagick/**/*"/>
[17707]55 <exclude name="bin/darwin/ghostscript"/>
56 <exclude name="bin/darwin/ghostscript/**/*"/>
[17423]57
[18005]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"/>
[18008]67 <exclude name="config.h.in"/>
[18049]68 <exclude name="Install.txt"/>
[18005]69
[18007]70 <exclude name="README*.txt"/>
71 <include name="READMEen.txt"/>
72
73
[17423]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>
[17659]82
83 <!-- sourcecode -->
[17423]84 <target name="prepare-sourcecode-component">
[17453]85
86 <delete dir="components/tmp/sourcecode"/>
[17423]87 <mkdir dir="components/tmp/sourcecode"/>
[17453]88
[18005]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">
[18049]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"/>
[18005]94 </exec>
[17423]95
[17956]96 <mkdir dir="products"/>
[18002]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"/>
[17981]107 </exec>
[18002]108
109 <!-- remove it -->
110 <delete file="create-sourcecode-component.sh"/>
111
[17423]112 </target>
[17659]113
[17423]114 <target name="compress-sourcecode-component">
115 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
116 </target>
[17652]117
[17659]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">
[17660]125 <fileset dir="distributions/web/bin/darwin">
[17659]126 <include name="imagemagick/**/*"/>
[17652]127 </fileset>
128 </copy>
[17659]129
130 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
[17652]131 </target>
[17659]132
133 <target name="compress-imagemagick-component">
134 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
[17652]135 </target>
[17707]136
[17663]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
[17423]156</project>
Note: See TracBrowser for help on using the repository browser.