dh_make to make a template for the package. It'll ask you a few questions and create the required
For a package that contains both binary executables and architecture-independent programs, you have two choices: make a single architecture-dependent binary package, or make an architecture-dependent binary package containing the binary executables and an architecture-independent binary package containing the scripts and other architecture-independent files. The main advantage of architecture-independent packages is to save space on distribution mirrors that store packages for multiple architectures. You also need to put the architecture-independent files in an architecture-independent package if you have a multiarch installation and you want to install the binaries for more than one architecture. Unless you care about this, make a single package, it's simpler. If you decide to make two packages, it's common to have a
foo architecture-dependent package depending on
foo-data which is architecture-independent.
Your source package will contain everything that's needed to prepare the binary package(s), including the deb packaging scripts in the
debian subdirectory, the sources of the compiled programs, and the various scripts. Keep the upstream archive as the source archive, don't reorganize or remove files to make the deb source package.
The Debhelper (
dh) build automation tools will take care of assembling the directory structure of the binary package. There's no relation between the directory structure in the source tree and for the installed package. The default
If the commands are something other than
./configure && make && make install, add corresponding targets in
debian/rules. For example, to pass options to
For installation of files, list files you need to copy in
debian/PACKAGENAME.install, they'll be copied by
dh_install. List directories to create in
See the debhelper manual for all the steps that can be configured. There's automation for installing build output, man pages, fonts, shared libraries, perl modules, etc.
For more information, see: