I will show how to build a debian package from source, needed if you need to apply a custom patch to some package.
- Download the debian source
# apt-get source package-name
- Download the dependencies required to build the source
# apt-get build-dep package-nam
Patch the source as needed.
Build the debian package:
# cd source-dir # debuild -us -uc
The recompiled .deb file will be in the parent directory, you can install it with dpkg as usual.