This really quick and dirty way to create your own Debian or Ubuntu packages can be done by anyone with little previous package creation experience.
Read more here
Most programs you would ever need are probably already packages. However, there are those occasions when you run across a program that's only released as source code or you would like to recompile a package that's optimized for your machine. In this how-to guide, I'll show you how to create a package in a few easy steps using the excellent checkinstall program.