Skip to content

Commit 5cde2a4

Browse files
committed
Added phing build script
1 parent 16a8f3e commit 5cde2a4

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

build.xml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0"?>
2+
<project name="SabreDAV" default="dist" basedir=".">
3+
4+
<property name="BUILDDIR" value="build/" />
5+
<svnlastrevision workingcopy="." propertyname="svn.lastrevision"/>
6+
7+
<fileset dir="${BUILDDIR}" id="pkgfiles">
8+
<include name="*.php" />
9+
<include name="**/*.php" />
10+
<include name="README" />
11+
<include name="LICENCE" />
12+
</fileset>
13+
14+
15+
<target name="prepare">
16+
<echo msg="Preparing build.." />
17+
<mkdir dir="${BUILDDIR}" />
18+
<copy file="LICENCE" todir="${BUILDDIR}" />
19+
</target>
20+
21+
<target name="build" depends="prepare">
22+
<echo msg="Copying source files" />
23+
<mkdir dir="${BUILDDIR}" />
24+
<copy todir="${BUILDDIR}">
25+
<fileset dir="lib/">
26+
<include name="*.php" />
27+
<include name="**/*.php" />
28+
</fileset>
29+
</copy>
30+
</target>
31+
32+
<!--
33+
<target name="buildexamples" depends="prepare">
34+
<echo msg="Copying examples" />
35+
<mkdir dir="${BUILDDIR}/examples" />
36+
<copy todir="${BUILDDIR}/examples">
37+
<fileset dir="examples/">
38+
<include name="*.php" />
39+
</fileset>
40+
</copy>
41+
</target>-->
42+
43+
<target name="package" depends="build, pearpkg">
44+
<echo msg="packaging" />
45+
</target>
46+
47+
<target name="pearpkg" depends="prepare, build">
48+
<pearpkg name="Sabre_DAV" dir="${BUILDDIR}" destFile="${BUILDDIR}/package.xml">
49+
<fileset refid="pkgfiles" />
50+
<option name="notes">Alpha release.</option>
51+
<option name="description">SabreDAV is a WebDAV library allowing you to implement WebDAV servers using just PHP 5. Its focus is to create a library that allows you to easily build WebDAV shares based on existing web applications, and has many features to accomodate for common clients in a logical manner.</option>
52+
<option name="summary">SabreDAV is a WebDAV library for PHP 5.</option>
53+
<option name="version" value="0.3.${svn.lastrevision}" />
54+
<option name="state" value="alpha" />
55+
<option name="licence" value="BSD" />
56+
<option name="baseinstalldir" value="/" />
57+
<mapping name="maintainers">
58+
<element>
59+
<element key="handle" value="evert" />
60+
<element key="name" value="Evert Pot" />
61+
<element key="email" value="evert@rooftopsolutions.nl" />
62+
<element key="role" value="lead" />
63+
</element>
64+
</mapping>
65+
<mapping name="deps">
66+
<element>
67+
<element key="type" value="php" />
68+
<element key="version" value="5.2.0" />
69+
<element key="rel" value="ge" />
70+
</element>
71+
</mapping>
72+
<mapping name="exceptions">
73+
<element key="README" value="doc" />
74+
<element key="LICENCE" value="doc" />
75+
</mapping>
76+
</pearpkg>
77+
</target>
78+
79+
<target name="documentation" depends="prepare">
80+
<phpdoc title="SabreDAV API Documentation" destdir="build/apidocs" sourcepath="Sabre/" output="HTML:frames:default" />
81+
</target>
82+
83+
<target name="dist" depends="build, pearpkg">
84+
<echo msg="Creating full featured SabreDAV package" />
85+
</target>
86+
87+
<target name="clean">
88+
<echo msg="Removing build files (cleaning up distribution)" />
89+
<delete dir="build/" />
90+
<delete dir="apidocs" />
91+
</target>
92+
93+
</project>

0 commit comments

Comments
 (0)