Debian Packaging

How I made a .deb file

Create a directory

mkdir foo

Descend into it.

cd foo

Create a directory DEBIAN

mkdir DEBIAN

Descend into it.

Create a text file called 'control'

vim control

Create key:value pairs as per http://www.debian.org/doc/debian-policy/ch-binary.html

The postinst and prerm scripts also go in the DEBIAN directory.

The actual install files go in the foo directory

./foo

./foo/DEBIAN

./foo/DEBIAN/control

./foo/DEBIAN/postinst

./foo/DEBIAN/prerm

./foo/bar.....

Finally, go to the directory above foo and do:

dpkg -b ./foo foo.deb and that is it! done!