Building packages for PECL extensions in Debian

The key is the dh-make-php package. It contains the dh-make-pecl command, which can download and prepare PECL extensions so you can easily build a Debian package from them.

Usage example (building a PHP5 package for the uploadprogress PECL extension):
apt-get install devscripts php5-dev dh-make-php xsltproc
dh-make-pecl --only 5 uploadprogress
cd php-uploadprogress-*
debuild -uc -us -b
dpkg -i ../php5-uploadprogress*.deb