DOKK / manpages / debian 10 / pkg-php-tools / dh_phppear.1.en
DH_PHPPEAR(1) Debhelper DH_PHPPEAR(1)

dh_phppear - calculates PHP PEAR substvars

dh_phppear [debhelper options] [options]

dh_phppear is a debhelper program that is responsible for generating the ${phppear:*} substitutions and adding them to substvars files.

The program will look at package.xml (or package2.xml) in the package, and will use this information to generate:

  • ${phppear:summary}, ${phppear:description} and ${phppear:channel}
  • ${phppear:Debian-Depends}, ${phppear:Debian-Recommends}, ${phppear:Debian-Suggests} and ${phppear:Debian-Breaks}

Deprecated: the <pear-channels> package should be used (and updated) instead of introducing a new standalone channel package.

The program will look at channel.xml in the package, and will use this information to generate:

  • ${phppear:channel-name}, ${phppear:channel-summary} and ${phppear:channel-alias}
  • ${phppear:channel-common-description}

Those variables will be substituted into the package's control file wherever the token ${phppear:*} are placed.

Assume that the original package source tree is at the specified directory rather than the top level directory of the Debian source package tree.

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

Package that don't want to follow automatic PEAR package name to Debian package name conversion can override the conversion by creating this file.

It can be installed in /usr/share/pkg-php-tools/overrides/src:package.

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

The format is a set of lines, with each line having the following fields:

The channel URL as found in package.xml (example: pear.phpunit.de).
The PEAR package name (example: phpunit).
The resulting Debian package name (example: phpunit).

Use builtin if the package is compiled from the php source package.

Use none if the PEAR package can't be simply translated to Debian name.

Optional, for composer packages only, can be none if the version constraint from the original package should not be used for the replacement. Useful when a package is being replaced by a PHP extension that doesn't follow the same versioning scheme.

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

  • Adding php-dev, pkg-php-tools (>= 1.6~) and dh-php to Build-Depends.
  • Adding ${shlibs:Depends} and ${misc:Depends} to Depends.
  • Adding --with php to dh line in debian/rules.

dh_phppear will remove md5sums and sha1sums to ease patching. You can patch as usual.

If some files are removed from the upstream tarball, the package will be incomplete unless they are stripped from the package.xml file in the PEAR package subdir. This can be done after the 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~).

Deprecated: the pear-channels package should be used (and updated) instead of introducing a new standalone channel package.

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

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

Debian policy, version 3.9.6.

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

debhelper(7), pkg-php-tools(7), /usr/share/doc/pkg-php-tools/README.PEAR

Mathieu Parent <sathieu@debian.org>

2019-01-14 1.37