forked from agavi/agavi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
297 lines (255 loc) · 11.7 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?xml version="1.0"?>
<project name="agavi" basedir="." default="main">
<!-- set up some stuff -->
<property environment="env"/>
<property file="build.properties"/>
<property name="package" value="${phing.project.name}" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<taskdef classname="etc.phing.AgaviVersionTask" name="agaviversion" />
<taskdef classname="etc.phing.AgaviPackageTask" name="agavipackage" />
<taskdef classname="etc.phing.AgaviOlsonCompileTask" name="agaviolsoncompile" />
<!-- fileset for -dist files -->
<fileset dir="." id="distfiles">
<include name="**/*-dist"/>
</fileset>
<!-- main target -->
<target name="main" description="main target">
<echo msg="available targets: " />
<echo msg=" docs : regenerate all documentation" />
<echo msg=" apidocs : regenerate API docs" />
<echo msg=" manuals : regenerate manuals (-Doutput=html|html-onepage|fo)" />
<echo msg=" packages : generate all packages" />
<echo msg=" package-pear : generate PEAR package" />
<echo msg=" package-release : generate API docs package" />
<echo msg=" test : run unit test suite" />
<echo msg=" clean : clean out cruft" />
</target>
<target name="docs" description="generate API docs and manuals">
<phingcall target="apidocs" />
<phingcall target="manuals" />
</target>
<target name="apidocs" description="API docs">
<phpdoc title="Agavi Documentation" destdir="apidocs" output="HTML:frames:DOM/earthli">
<fileset dir="./src">
<include name="**/*.php" />
<exclude name="vendor/**" />
<exclude name="translation/data/**" />
</fileset>
</phpdoc>
</target>
<target name="manuals" description="generate all manuals">
<property name="output" value="html" override="false" />
<phingcall target="cookbook-${output}" />
<phingcall target="introduction-${output}" />
<phingcall target="guide-${output}" />
</target>
<!--target name="manual-cookbook">
<phingcall target="cookbook-${output}" />
</target>
<target name="manual-introduction">
<phingcall target="introduction-${output}" />
</target>
<target name="manual-guide">
<phingcall target="guide-${output}" />
</target-->
<!-- Agavi Cookbook -->
<target name="cookbook-html" >
<mkdir dir="manuals/cookbook/html/multipage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/cookbook/html/multipage" overwrite="true" />
<xslt file="docs/docbook/cookbook.xml" todir="manuals/cookbook/html/multipage" style="docs/lib/agavi-manual-html.xsl">
<param name="onechunk" expression="0" />
<param name="base.dir" expression="manuals/cookbook/html/multipage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<target name="cookbook-html-onepage" >
<mkdir dir="manuals/cookbook/html/onepage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/cookbook/html/onepage" overwrite="true" />
<xslt file="docs/docbook/cookbook.xml" todir="manuals/cookbook/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
<param name="onechunk" expression="1" />
<param name="base.dir" expression="manuals/cookbook/html/onepage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<!-- Introduction to Agavi -->
<target name="introduction-html" >
<mkdir dir="manuals/introduction/html/multipage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/introduction/html/multipage" overwrite="true" />
<xslt file="docs/docbook/introduction.xml" todir="manuals/introduction/html/multipage" style="docs/lib/agavi-manual-html.xsl">
<param name="onechunk" expression="0" />
<param name="base.dir" expression="manuals/introduction/html/multipage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<target name="introduction-html-onepage" >
<mkdir dir="manuals/introduction/html/onepage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/introduction/html/onepage" overwrite="true" />
<xslt file="docs/docbook/introduction.xml" todir="manuals/introduction/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
<param name="onechunk" expression="1" />
<param name="base.dir" expression="manuals/introduction/html/onepage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<!-- Definitive Guide -->
<target name="guide-html" >
<mkdir dir="manuals/guide/html/multipage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/guide/html/multipage" overwrite="true" />
<xslt file="docs/docbook/manual.xml" todir="manuals/guide/html/multipage" style="docs/lib/agavi-manual-html.xsl">
<param name="onechunk" expression="0" />
<param name="base.dir" expression="manuals/guide/html/multipage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<target name="guide-html-onepage" >
<mkdir dir="manuals/guide/html/onepage" />
<copy file="docs/lib/agavi-manual.css" todir="manuals/guide/html/onepage" overwrite="true" />
<xslt file="docs/docbook/manual.xml" todir="manuals/guide/html/onepage" style="docs/lib/agavi-manual-html-onepage.xsl">
<param name="onechunk" expression="1" />
<param name="base.dir" expression="manuals/guide/html/onepage/" /><!-- end slash required -->
<param name="root.filename" expression="index" />
<param name="html.stylesheet" expression="agavi-manual.css" />
<param name="chunker.output.encoding" expression="UTF-8" />
<param name="id.warnings" expression="0" />
<param name="header.rule" expression="0" />
<param name="footer.rule" expression="0" />
<param name="suppress.navigation" expression="1" />
</xslt>
</target>
<!-- manuals FO -->
<target name="cookbook-fo" >
<mkdir dir="manuals/guide/fo" />
<xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/cookbook.fo" style="docs/lib/agavi-manual-fo.xsl" >
<param name="base.dir" expression="manuals/guide/fo/" />
<param name="paper.type" expression="A4" />
</xslt>
</target>
<target name="introduction-fo" >
<mkdir dir="manuals/guide/fo" />
<xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/introduction.fo" style="docs/lib/agavi-manual-fo.xsl" >
<param name="base.dir" expression="manuals/guide/fo/" />
<param name="paper.type" expression="A4" />
</xslt>
</target>
<target name="guide-fo" >
<mkdir dir="manuals/guide/fo" />
<xslt file="docs/docbook/manual.xml" tofile="manuals/guide/fo/guide.fo" style="docs/lib/agavi-manual-fo.xsl" >
<param name="base.dir" expression="manuals/guide/fo/" />
<param name="paper.type" expression="A4" />
</xslt>
</target>
<target name="generate-properties">
<agaviversion />
</target>
<target name="package-zip">
<!-- zip a release package -->
</target>
<target name="package-apidocs">
<phingcall target="apidocs" />
<!-- now zip that -->
</target>
<target name="package-manuals">
<phingcall target="manuals" />
<!-- now zip that -->
</target>
<target name="package-pear" depends="generate-properties" description="build pear package">
<!-- prepare -->
<property name="basedir" value="pear-build" override="true" />
<property name="builddir" value="${basedir}/agavi-${agavi.pear.version}" override="true" />
<delete dir="${builddir}" includeemptydirs="true" verbose="false" failonerror="false" />
<delete file="agavi-${agavi.pear.version}.tgz" verbose="false" failonerror="false" />
<mkdir dir="${builddir}" />
<copy todir="${builddir}/samples">
<fileset dir="samples/">
<include name="**/*" />
</fileset>
</copy>
<copy file="API_CHANGELOG" todir="${builddir}" />
<copy file="CHANGELOG" todir="${builddir}" />
<copy file="COPYRIGHT" todir="${builddir}" />
<copy file="INSTALL" todir="${builddir}" />
<copy file="LICENSE" todir="${builddir}" />
<copy file="LICENSE-AGAVI" todir="${builddir}" />
<copy file="LICENSE-ICU" todir="${builddir}" />
<copy file="LICENSE-SCHEMATRON" todir="${builddir}" />
<copy file="LICENSE-UNICODE_CLDR" todir="${builddir}" />
<copy file="RELEASE_NOTES" todir="${builddir}" />
<copy file="UPGRADING" todir="${builddir}" />
<copy todir="${builddir}">
<fileset dir="src/">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${builddir}/bin">
<fileset dir="bin/">
<include name="**/*" />
</fileset>
</copy>
<!-- generate package.xml -->
<agavipackage baseDir="${basedir}" buildDir="${builddir}" />
<!-- create .tgz file -->
<echo msg="Creating gzip file for PEAR." />
<tar destfile="agavi-${agavi.pear.version}.tgz" basedir="${basedir}" compression="gzip" />
</target>
<target name="package-release" depends="generate-properties">
<delete dir="./package-build" includeemptydirs="true" verbose="false" failonerror="false" />
<delete file="${agavi.pear.version}.tgz" verbose="false" failonerror="false" />
<delete file="${agavi.pear.version}.zip" verbose="false" failonerror="false" />
<mkdir dir="./package-build/agavi-${agavi.pear.version}" />
<copy todir="./package-build/agavi-${agavi.pear.version}">
<fileset dir=".">
<exclude name="*-build/**" />
<exclude name="*.tgz*" />
<exclude name="*.zip*" />
<exclude name="composer.lock" />
<exclude name="vendor/**" />
<include name="**/*" />
</fileset>
</copy>
<tar destfile="${agavi.pear.version}.tgz" compression="gzip">
<fileset dir="./package-build" />
</tar>
<zip destfile="${agavi.pear.version}.zip">
<fileset dir="./package-build" />
</zip>
</target>
<target name="packages" depends="package-pear,package-release" />
<target name="clean" description="clean out the cruft">
<delete dir="manuals" includeemptydirs="true" failonerror="true" />
<delete dir="pear-build" includeemptydirs="true" failonerror="true" />
<delete dir="apidocs" includeemptydirs="true" quiet="true" failonerror="false" />
<delete file="tests.html" includeemptydirs="true" quiet="true" failonerror="false" />
</target>
<target name="olson" description="build timezone datebase">
<agaviolsoncompile olsonDir="${srcdir}/etc/olson/tzdata" outputDir="${srcdir}/src/translation/data/timezones" />
</target>
</project>