HOWTO : Build deb from source on Ubuntu 9.04

Download checkinstall

sudo apt-get install checkinstall

Download the source file, such as foo.tar.gz and extract it.


tar -xzvf foo.tar.gz
cd foo

sudo checkinstall

After that, the package will be installed automatically and a deb is also generated. You can uninstall package as usual.

For checkinstall usage, please man it.