Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

107 lines (105 sloc) 4.592 kB
<?xml version="1.0" encoding="UTF-8"?>
<project name="baskit-build" default="build_all">
<!-- Phing build file for generating baskit installation packages (PEAR, deb and rpm) -->
<tstamp>
<format property="baskit.package.date" pattern="%Y-%m-%d" />
<format property="baskit.package.time" pattern="%H:%M:%s" />
</tstamp>
<property file="build.properties"/>
<taskdef name="pearinstall" classname="phing.tasks.PearInstallTask" />
<pearinstall name="channel://pear.php.net/XML_Serializer-0.20.2"/>
<pearinstall name="PEAR_PackageFileManager" args="--alldeps"/>
<target name="build_all">
<phingcall target="build_pear"/>
<phingcall target="build_deb"/>
<phingcall target="build_rpm"/>
</target>
<target name="build_pear">
<mkdir dir="${baskit.package.builds_dir}"/>
<mkdir dir="${baskit.package.builds_output_dir}"/>
<mkdir dir="${baskit.package.builds_output_dir}/pear"/>
<copy file="${baskit.package.templates_dir}/package.xml"
tofile="${application.startdir}/package.xml" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<exec command="bin/pear package" dir="${application.startdir}"/>
<delete file="${baskit.package.builds_dir}/baskit-${baskit.package.version}.tgz"/>
<copy todir="${baskit.package.builds_dir}">
<fileset dir="${application.startdir}">
<include name="baskit-${baskit.package.version}.tgz"/>
</fileset>
</copy>
<move file="${application.startdir}/baskit-${baskit.package.version}.tgz"
todir="${baskit.package.builds_output_dir}/pear"/>
</target>
<target name="build_deb">
<mkdir dir="${baskit.package.builds_dir}"/>
<mkdir dir="${baskit.package.builds_dir}/deb"/>
<mkdir dir="${baskit.package.builds_output_dir}"/>
<mkdir dir="${baskit.package.builds_output_dir}/deb"/>
<exec
command="echo 'xxxxxxxxxxxxxxxxxx' | dh_make --native -e ${baskit.package.maintainer.email} -f ../baskit-${baskit.package.version}.tgz -m -c apache -p baskit_${baskit.package.version}"
dir="${baskit.package.builds_dir}/deb" />
<copy file="${baskit.package.templates_dir}/debian_copyright"
tofile="${baskit.package.builds_dir}/deb/debian/copyright" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<copy file="${application.startdir}/CHANGELOG"
tofile="${baskit.package.builds_dir}/deb/debian/changelog" overwrite="true"/>
<copy file="${baskit.package.templates_dir}/debian_control"
tofile="${baskit.package.builds_dir}/deb/debian/control" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<copy file="${baskit.package.templates_dir}/debian_rules"
tofile="${baskit.package.builds_dir}/deb/debian/rules" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<copy file="${application.startdir}/package.xml" tofile="${baskit.package.builds_dir}/deb/package.xml">
<filterchain>
<replaceregexp>
<regexp pattern="baskit\.h\.isotoma\.com" replace="pear.php.net"/>
</replaceregexp>
</filterchain>
</copy>
<exec command="dpkg-buildpackage -A -rfakeroot" dir="${baskit.package.builds_dir}/deb" />
<copy todir="${baskit.package.builds_output_dir}/deb">
<fileset dir="${baskit.package.builds_dir}">
<include name="*.deb"/>
</fileset>
</copy>
</target>
<target name="build_rpm">
<mkdir dir="${baskit.package.builds_dir}"/>
<mkdir dir="${baskit.package.builds_output_dir}"/>
<mkdir dir="${baskit.package.builds_output_dir}/rpm"/>
<php returnProperty="userhome" function="getenv">
<param value="HOME"/>
</php>
<mkdir dir="${userhome}/rpmbuild"/>
<mkdir dir="${userhome}/rpmbuild/SPECS"/>
<mkdir dir="${userhome}/rpmbuild/SOURCES"/>
<copy file="${baskit.package.builds_dir}/baskit-${baskit.package.version}.tgz" todir="${userhome}/rpmbuild/SOURCES"/>
<copy file="${baskit.package.templates_dir}/rpm_spec"
tofile="${userhome}/rpmbuild/SPECS/baskit-${baskit.package.version}.spec" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<exec
command="rpmbuild -bb --nodeps baskit-${baskit.package.version}.spec"
dir="${userhome}/rpmbuild/SPECS"/>
<copy todir="${baskit.package.builds_output_dir}/rpm">
<fileset dir="${userhome}/rpmbuild/RPMS">
<include name="**/*.rpm"/>
</fileset>
</copy>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.