I've fixed up the postinst and prerm and created a new patch.
=== added file 'pear.template/postinst' --- pear.template/postinst 1970-01-01 00:00:00 +0000 +++ pear.template/postinst 2007-09-13 21:25:10 +0000 @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + if [ -f /usr/share/doc/##packagename##/package.xml -a -x /usr/bin/pear ]; then + cd /usr/share/doc/##packagename## + /usr/bin/pear install -r -n package.xml + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0
=== added file 'pear.template/prerm' --- pear.template/prerm 1970-01-01 00:00:00 +0000 +++ pear.template/prerm 2007-09-13 21:25:53 +0000 @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +case "$1" in + remove|upgrade|deconfigure) + if [ -x /usr/bin/pear ]; then + /usr/bin/pear uninstall -r -n ##pearpkgname## + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 === modified file 'debian/changelog' --- debian/changelog 2007-08-30 17:54:12 +0000 +++ debian/changelog 2007-09-13 21:27:21 +0000 @@ -1,3 +1,10 @@ +dh-make-php (0.2.6.1) unstable; urgency=low + + * Add postinst, prerm scripts. Keep package.xml in docs for use. + Update watch template. + + -- Mark A. Hershberger <[EMAIL PROTECTED]> Thu, 30 Aug 2007 13:58:29 -0400 + dh-make-php (0.2.6) unstable; urgency=low * Use -P instead of -R in pear.mk when calling 'pear install' === modified file 'dh-make-pear' --- dh-make-pear 2007-08-30 17:54:12 +0000 +++ dh-make-pear 2007-08-30 20:37:02 +0000 @@ -174,3 +174,10 @@ sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \ ${DEBTEMPDIR}/watch > ${SRCPACKAGEDIR}/debian/watch +sed -e "s/##packagename##/${DEBPACKAGEPREFIX}-${PHP_PKG_LOWNAME}/g" \ + ${DEBTEMPDIR}/postinst > ${SRCPACKAGEDIR}/debian/postinst +chmod 755 ${SRCPACKAGEDIR}/debian/postinst + +sed -e "s/##pearpkgname##/${PHP_PKG_NAME}/g" \ + ${DEBTEMPDIR}/prerm > ${SRCPACKAGEDIR}/debian/prerm +chmod 755 ${SRCPACKAGEDIR}/debian/prerm === modified file 'pear.mk' --- pear.mk 2007-08-30 17:54:12 +0000 +++ pear.mk 2007-08-30 17:46:42 +0000 @@ -64,6 +64,7 @@ # move documentation to correct location mkdir -p $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR) + cp package.xml $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR) if [ -d $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR) ] ; then \ mv -i $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR)/* $(DEB_DESTDIR)$(PEAR_NEW_DOC_DIR); \ rmdir $(DEB_DESTDIR)$(PEAR_OLD_DOC_DIR); \ === modified file 'pear.template/rules' --- pear.template/rules 2007-08-30 17:54:12 +0000 +++ pear.template/rules 2007-08-30 19:47:58 +0000 @@ -1,5 +1,7 @@ #!/usr/bin/make -f # template debian/rules provided by dh-make-php. +DEB_COMPRESS_EXCLUDE=package.xml + include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/pear.mk === modified file 'pear.template/watch' --- pear.template/watch 2007-08-30 17:54:12 +0000 +++ pear.template/watch 2007-08-30 17:42:17 +0000 @@ -1,2 +1,2 @@ version=3 -http://pear.php.net/package/##pearpkgname##/download /get/##pearpkgname##-([\d.]+)\.tgz debian uupdate +http://pear.php.net/package/##pearpkgname##/download http://download.pear.php.net/package/##pearpkgname##-([\d.]+)\.tgz