=head1 NAME

pkg-php-tools - debhelper tool suite for PHP PEAR packages and channels

=head1 SYNOPSIS


B<dh> $@ --buildsystem=B<phppear> --with B<phppear>

=head1 DESCRIPTION

For a quick start, read F</usr/share/doc/pkg-php-tools/README.PEAR>.

L<dh_phppear(1)> is a debhelper program that is responsible for generating the
B<${phppear:*}> substitutions and adding them to substvars files. See the
corresponding manpage.

B<dh_phpcomposer> is a debhelper program that is responsible for generating
the B<${phpcomposer:*}> substitutions and adding them to substvars files. See
the corresponding manpage.

I<Debian::Debhelper::Buildsystem::phppear> is an additionnal build system
targeted at PHP PEAR packages (with a package.xml or package2.xml file) and PHP
PEAR channels (with a channel.xml file). See below.

=head1 ADVANCED USAGE

=head2 Building a PECL package

A PECL package is a PEAR package which is compiled. Extra steps are needed:

=over 2

=item *

Adding B<php5-dev>, B<pkg-php-tools> (>= 1.6~) and B<dh-php5> to Build-Depends.

=item *

Adding B<${shlibs:Depends}> and B<${php:Depends}> to Depends.

=item *

Adding "--with B<php5>" to B<dh> line in I<debian/rules>.

=back

=head2 Building a channel package

Simply put the channel.xml file downloaded from the PEAR channel in the root of
the package source and use a I<debian/rules> similar to a PEAR package.

This feature requires pkg-php-tools (>= 1.3~)

=head2 Overriding a PEAR Debian package name

See L<dh_phppear(1)/FILES>.

=head2 Patching

pkg-php-tools will remove md5sums and sha1sums to ease patching. You can patch
as usual.

=head2 Removing some files from the upstream tarball

If you have removed some files from the upstream tarball, you will end with an
incomplete package unless you strip them from the I<package.xml> file in the PEAR
package subdir. You can do this after the I<dh_auto_configure> step. Example:

  override_dh_auto_configure:
  	dh_auto_configure -O--buildsystem=phppear
  	# Remove references of JsMin
  	sed -i '/JsMin\.php/d' */package.xml

This feature requires pkg-php-tools (>= 1.1~)

=head1 CONFORMS TO

Debian policy, version 3.9.4

PHP PEAR policy, version yet-to-be-written

=head1 SEE ALSO

F</usr/share/doc/pkg-php-tools/README.PEAR>, L<dh_phppear(1)>, L<dh_phpcomposer(1)>

L<debhelper(7)> (Note: This program is not part of debhelper)

=head1 AUTHOR

Mathieu Parent <sathieu@debian.org>

