source: release-kits/lirk3/ant-scripts/create-components.xml@ 17712

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

create a compressed zipfile of the sourcecode component, for download

File size: 5.8 KB
RevLine 
[17422]1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-create-components" default="create-components">
3
4 <!-- create components from the distribution folder -->
[17652]5
6 <!-- 1st level -->
[17422]7 <target name="create-components">
[17645]8 <antcall target="prepare-components" />
9 <antcall target="compress-components" />
[17422]10 </target>
11
[17652]12 <!-- 2nd level -->
[17645]13 <target name="prepare-components">
[17422]14 <antcall target="prepare-core-component" />
[17645]15 <antcall target="prepare-sourcecode-component" />
16 <antcall target="prepare-ant-component" />
17 <antcall target="prepare-tomcat-component" />
18 <antcall target="prepare-imagemagick-component" />
[17652]19 <antcall target="prepare-sourcecode-core-component" />
[17422]20 </target>
21
[17645]22 <target name="compress-components">
23 <antcall target="compress-core-component" />
[17422]24 <antcall target="compress-sourcecode-component" />
[17645]25 <antcall target="compress-ant-component" />
26 <antcall target="compress-tomcat-component" />
27 <antcall target="compress-imagemagick-component" />
[17652]28 <antcall target="compress-sourcecode-core-component" />
[17422]29 </target>
[17645]30
[17652]31 <!-- 3rd level -->
[17659]32
33 <!-- core -->
[17422]34 <target name="prepare-core-component">
35
[17446]36 <delete dir="components/tmp/core"/>
[17422]37 <mkdir dir="components/tmp/core"/>
38
39 <copy todir="components/tmp/core" overwrite="true">
40 <fileset dir="distribution/greenstone3">
41 <include name="**/*"/>
42
43 <!-- exclude sourcecode -->
[17645]44 <exclude name="src"/>
[17447]45 <exclude name="src/**/*"/>
[17645]46 <exclude name="gs2build/common-src"/>
[17422]47 <exclude name="gs2build/common-src/**/*"/>
[17645]48 <exclude name="gs2build/build-src"/>
[17422]49 <exclude name="gs2build/build-src/**/*"/>
[17645]50 <exclude name="gs2build/runtime-src"/>
[17422]51 <exclude name="gs2build/runtime-src/**/*"/>
[17645]52 <exclude name="packages/ant"/>
[17422]53 <exclude name="packages/ant/**/*"/>
[17645]54 <exclude name="packages/tomcat"/>
[17422]55 <exclude name="packages/tomcat/**/*"/>
[17645]56 <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick"/>
57 <exclude name="distributions/greenstone3/gs2build/bin/linux/imagemagick/**/*"/>
[17422]58
59 </fileset>
60 </copy>
61
62 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
63 </target>
64
65 <target name="compress-core-component">
66 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
67 </target>
[17659]68
69 <!-- sourcecode-core -->
70 <target name="prepare-sourcecode-core-component">
71 <delete dir="components/tmp/sourcecode-core"/>
72 <mkdir dir="components/tmp/sourcecode-core"/>
73
74 <copy todir="components/tmp/sourcecode-core" overwrite="true">
75 <fileset dir="distribution/source">
76 <include name="gli/**/*"/>
77 <include name="docs/**/*"/>
78 <include name="resources/**/*"/>
79 <include name="web/**/*"/>
80 <include name="gs2build/etc/**/*"/>
81 <include name="gs2build/setup.bash"/>
82 <include name="build.xml"/>
83 <include name="build.properties"/>
84 <include name="*.sh"/>
85 <include name="*.txt"/>
86 </fileset>
87 </copy>
[17712]88 <zip destfile="components/sourcecode-core.comp" basedir="components/tmp/sourcecode-core" compress="false"/>
[17659]89 </target>
[17422]90
[17659]91 <target name="compress-sourcecode-core-component">
92 <sevenzip task="encode" input="components/sourcecode-core.comp" output="components/sourcecode-core.lzma" dictionnary="26"/>
93 </target>
94
95 <!-- sourcecode -->
[17422]96 <target name="prepare-sourcecode-component">
[17446]97
98 <delete dir="components/tmp/sourcecode"/>
[17422]99 <mkdir dir="components/tmp/sourcecode"/>
[17446]100
[17422]101 <copy todir="components/tmp/sourcecode" overwrite="true">
102 <fileset dir="distribution/greenstone3">
103 <include name="src/**/*"/>
104 <include name="gs2build/common-src/**/*"/>
105 <include name="gs2build/build-src/**/*"/>
106 <include name="gs2build/runtime-src/**/*"/>
107 </fileset>
108 </copy>
109
110 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
[17712]111 <zip destfile="components/sourcecode.zip" basedir="components/tmp/sourcecode" compress="true" />
[17422]112 </target>
113
114 <target name="compress-sourcecode-component">
115 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
116 </target>
[17659]117
118 <!-- ant -->
[17422]119 <target name="prepare-ant-component">
[17446]120
121 <delete dir="components/tmp/ant"/>
[17422]122 <mkdir dir="components/tmp/ant"/>
[17446]123
[17422]124 <copy todir="components/tmp/ant" overwrite="true">
125 <fileset dir="distribution/greenstone3/packages">
126 <include name="ant/**/*"/>
127 </fileset>
128 </copy>
129
130 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
131 </target>
132
133 <target name="compress-ant-component">
134 <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
135 </target>
136
[17659]137 <!-- tomcat -->
[17422]138 <target name="prepare-tomcat-component">
[17446]139
140 <delete dir="components/tmp/tomcat"/>
[17422]141 <mkdir dir="components/tmp/tomcat"/>
[17446]142
[17422]143 <copy todir="components/tmp/tomcat" overwrite="true">
144 <fileset dir="distribution/greenstone3/packages">
145 <include name="tomcat/**/*"/>
146 </fileset>
147 </copy>
148
149 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
150 </target>
151
152 <target name="compress-tomcat-component">
153 <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
[17645]154 </target>
155
[17659]156 <!-- imagemagick -->
[17645]157 <target name="prepare-imagemagick-component">
158
159 <delete dir="components/tmp/imagemagick"/>
160 <mkdir dir="components/tmp/imagemagick"/>
161
162 <copy todir="components/tmp/imagemagick" overwrite="true">
163 <fileset dir="distribution/greenstone3/gs2build/bin/linux">
164 <include name="imagemagick/**/*"/>
165 </fileset>
166 </copy>
167
168 <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" includes="**/*"/>
169 </target>
170
171 <target name="compress-imagemagick-component">
172 <sevenzip task="encode" input="components/imagemagick.comp" output="components/imagemagick.lzma" dictionnary="26"/>
173 </target>
[17652]174
[17422]175</project>
Note: See TracBrowser for help on using the repository browser.