Copy the binaries, libraries, config files into BUILD/usr/local/
directory tree.
Create subdirectory DEBIAN with the control file and
post/pre installation/removal scripts:
Building package soft_20100217-0_i386.deb on a 32 bit system.
cd BUILD
dpkg -b . /tmp/soft_20120208-0_i386.deb
The package can be transfered to another Ubuntu or Debian system with similar 32 bit architecture, i386, and installed:
dpkg -i soft_20120208-0_i386.deb
On a 64 bit architecture, the package file name suffix is _amd64.deb:
cd BUILD
dpkg -b . /tmp/soft_20120208-0_amd64.deb
dpkg -i soft_20120208-0_amd64.deb