DH_PHPPEAR(1)
๐ DH_PHPPEAR โ the dh_phppear era ๐
okay bestie, gather round, because we're talking about dh_phppear from the Debhelper family, and she is booked and busy calculating PHP PEAR substvars โจ
โจ NAME โจ
dh_phppear โ she calculates your PHP PEAR substvars, no cap ๐งฎ๐
๐ธ SYNOPSIS ๐ธ
dh_phppear [debhelper options] [options]
๐ฆ DESCRIPTION ๐ฆ
so dh_phppear is a debhelper program, and her whole job โ her main character moment โ is generating the ${phppear:*} substitutions and dropping them into substvars files. that's it. that's the gig ๐ซถ
first up, she peeks at package.xml (or package2.xml if that's the vibe) inside the package, and uses that info 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. ok so this is the old way, and we don't do the old way anymore ๐
next, she looks at channel.xml in the package and uses that info to generate:
${phppear:channel-name},${phppear:channel-summary}and${phppear:channel-alias}${phppear:channel-common-description}
and then all of those variables get substituted into the package's control file wherever the token ${phppear:*} is placed. like, wherever you put the little placeholder, she fills it in. iconic behavior honestly ๐
๐ OPTIONS ๐
--sourcedirectory=directoryโ assume the original package source tree lives at the specified directory instead of the top level directory of the Debian source package tree. lowkey a glow-up for your layout ๐
this feature requires pkg-php-tools (>= 1.14~). don't forget it bestie, she will not work without it ๐ญ
๐ FILES ๐
debian/pkg-php-tools-overridesโ packages that don't wanna follow the automatic PEAR-package-name โ Debian-package-name conversion can override that conversion by creating this file. yes, you get to have opinions โจ
it can be installed in /usr/share/pkg-php-tools/overrides/package.
this feature requires pkg-php-tools (>= 1~).
the format is a set of lines, with each line having the following fields:
channel_urlโ the channel URL as found inpackage.xml(example:pear.phpunit.de).pear_package_nameโ the PEAR package name (example:phpunit).debian_package_nameโ the resulting Debian package name (example:phpunit).- Use
builtinif the package is compiled from the php source package. - Use
noneif the PEAR package can't be simply translated to Debian name.
- Use
version_overrideโ optional, for composer packages only, can benoneif 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. we love a special case ๐
๐ฅ ADVANCED USAGE ๐ฅ
๐ง Building a PECL package
a PECL package is a PEAR package which is compiled. so extra steps are needed, bestie:
- adding
php-dev,pkg-php-tools (>= 1.6~)anddh-phptoBuild-Depends. - adding
${shlibs:Depends}and${misc:Depends}toDepends. - adding
--with phpto the dh line indebian/rules.
๐ Patching
dh_phppear will remove md5sums and sha1sums to ease patching. so you can patch as usual, no stress ๐ซถ
๐ Removing some files from the upstream tarball
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~).
๐ Building a channel package (DEPRECATED)
Deprecated: the pear-channels package should be used (and updated) instead of introducing a new standalone channel package. we said what we said ๐
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~).
โญ CONFORMING TO โญ
- Debian policy, version
3.9.6. - PHP PEAR policy, version yet-to-be-written. (girl same, still a work in progress ๐)
๐ SEE ALSO ๐
debhelper(7), pkg-php-tools(7), /usr/share/doc/pkg-php-tools/README.PEAR
๐ธ AUTHOR ๐ธ
Mathieu Parent <sathieu@debian.org> โ the real one, the legend, the icon ๐ซถ
and that's the whole page bestie!! this was version 1.49build1, dated 2025-12-06, brought to you by Debhelper. mwah, go slay your packaging ๐
โจ
๐ฆ where this page comes from
- ubuntu resolute: pkg-php-tools 1.49build1 ยท LGPL-3.0-only
- ubuntu stonking: pkg-php-tools 1.49build1 ยท LGPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms