I can’t work out where to document this so I’ll document it here – maybe it will help someone oneday.
If you want to modify a debian package and then build it…
apt-get source . Then cd –
make whatever changes you need to make. debian/rules and debian/control.in are interesting.
then do a ‘dch -n’ to change the version number of the package to a user version.
dpkg-buildpackage -rfakeroot -b -uc -us
stick -nc on the end if you don’t want a make clean to be done