Simple structure of a package debian or ubuntu.
sudo aptitude install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder equivs
equivs-control control
myapp_0.1.0-stable-ubuntu1204_amd64.deb
dpkg -b myapp_0.1.0-stable-ubuntu1204_amd64
dpkg -i myapp_0.1.0-stable-ubuntu1204_amd64.deb
sudo apt-get -y remove --purge myapp