When you seriously think about packaging as a newcomer to Debian, please read the official documentation:
Whether you want
- to install some programs or data on several computers
- to have consistent and deterministic versioning
- the packaging system to take care of updates
to help the Debian project. (see Work-Needing and Prospective Packages)
What is a "package"?
There are two kinds of packages: "binary" (.deb) and "source" (.dsc) packages. There are tools (e.g. cpack) that are able to generate "binary" packages but such packaging is ad-hoc (build-system specific) and fragile. Such packages are more likely to fail to operate when the target system diverges from the original environment they were built in.
"source" packages in turn can be built to produce "binary" packages on any other machine and architecture. In a standardized, language and underlying build-system (make vs cmake) agnostic form they provide all the necessary information about build and run-time dependencies and conflicts, a standardized description of copyright and license information, an initial configuration, etc. That is why "binary" packages alone, without the "source" packages originating them, can not be submitted for inclusion into an official Debian distribution.
Therefore Packaging in the Debian world is primarily concerned with "source" packages. "binary" packages are just a product of such work.
Introduction to Debian Packaging
If you need to create rapidly a package, use equivs:
If you prefer to gain real knowledge about Debian packaging:
first read the excellent introduction to Debian Packaging to build a package from scratch,
you can also look at the building tutorial to apply changes to an existing package.
or the packaging tutorial with dh-make.
Now that you have seen the basics, it is highly recomanded that you read some real stuff:
the Debian New Maintainers' Guide describes the building of a Debian package to ordinary Debian users.
the Debian Policy includes technical requirements that each package must satisfy.
Then, if you are looking for answers, you can come back here or read:
the interesting pdf file included in the package packaging-tutorial.
The Developers Reference provides an overview of the recommended procedures and the available resources for Debian developers.
Please note that some Debian Derivatives resources may be quite useful too.
Learn more about the DEX project
Advanced Packaging Procedures
from Debian Women
?Adding and removing diversions
?How to split a package into smaller packages
Repackage_srcrpm - creating a proper Debian source package while referencing the src.rpm package
RPM - Converting a .RPM into .DEB with alien - generally leads to bad results
Creating package without some particular architectures - for easy porting
External useful links
http://www.debian.org/doc/manuals/apt-howto/ and package apt-howto
http://www.debian.org/devel/wnpp/prospective : requested packages, and packages being worked on.
http://www-128.ibm.com/developerworks/linux/library/l-debpkg.html : creating debian packages - high-level description of debian packaging .
http://www.debian-administration.org/articles/336 Rolling your own debian packages.
Autobuilding non-free packages: http://article.gmane.org/gmane.linux.debian.devel.announce/997
PackageConfigUpgrade : propose a new way to smoothly handle configuration upgrades during package upgrades