These are tools to create basic Debian packages. For packaging projects in different languages, see Language-specific guides. For tools to create other parts of a system, see PackagingTools.
These generate Debian packages in any language. They often wrap language-specific package generators (see below).
These use language-specific features (like documentation standards or software repositories) to choose better defaults.
Language |
Any |
Perl |
Ruby |
Python |
Python |
Node.js |
Haskell |
Go |
ELPA (Emacs Lisp) |
Tool (package name) |
dh-make-elpa |
||||||||
Upstream repository |
N/A |
varies |
|||||||
Debian guide |
|||||||||
|
|||||||||
Features |
|||||||||
version |
1.20150601 |
0.89-1 |
0.21.1 |
0.8.5-1 |
0.20160809 |
0.2.2-1 |
4.31-1 |
0.6.0-1 |
0.1.0 (experimental) |
cdbs or dh? |
dh |
dh |
dh |
dh |
dh |
dh |
cdbs |
dh |
dh |
use DEBEMAIL |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
Build-Depends |
❌ |
✅ 2 |
✅ 3 |
partial4 |
✅ |
❌ |
✅ 3 |
✅ |
partial5 |
Depends |
❌ |
✅ 2 |
✅ 3 |
✅ 4 |
✅ 3 |
✅ |
at build time3 |
✅ |
✅5 |
Homepage |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
❌ |
✅ |
✅ |
short/long descriptions |
❌ |
✅ |
✅ |
✅ |
✅ |
short only |
✅ |
✅ |
✅ |
DEP8 tests |
❌ |
✅ (autopkgtest-pkg-perl in pkg-perl mode) |
only template 6 |
❌ |
❌ |
basic (only require) |
❌ |
dh-golang autopkgtest |
❌ |
.docs / .examples / etc. |
❌ |
docs + examples |
docs only |
❌ |
docs + examples |
docs |
❌ |
❌ |
docs only |
debian/copyright |
only template 6 |
✅ |
only template 6 |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
debian/watch |
only template 6 |
yes |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
git repo creation, pristine-tar, etc. |
❌ |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
✅ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
❌ |
|
ITP mail template |
❌ |
❌(use dpt gen-itp) |
❌ |
❌ |
✅ |
✅ |
❌ |
✅ |
❌ |
recursive |
no 7 |
||||||||
Notes
autodeb-tests has example inputs and outputs for several tools
Several tools use wrap-and-sort to tidy up debian/ files
DEP-11 could end up being the proper way to generate language-specific dependencies
deb-fix-build from ognibuild will parse build logs for missing {build,test} dependencies to add, repeating until the build succeeds
for other languages, see...
PHP (PEAR packages): Packaging PHP Applications, pkg-php-tools and debpear
Java: Java/Packaging
OCaml: oasis2debian and opam2debian were attempts to create OCaml packaging tools
Common Lisp: ql-to-deb updates Common Lisp libraries debian packages from the current release found at Quicklisp
Usage
- Download upstream package from repository
Perl: cpan -g Oxford::Calendar (does nothing here ...; here it works
maybe cpan config needed?) Python: pypi-download NAME --release VERSION, f.e. pypi-download Mako --release 1.0.1
npm: npm install PKGNAME
Ruby: gem fetch GEMNAME
Haskell: cabal unpack --pristine PKGNAME
ELPA: user is expected to git clone upstream repository
- Debianize an unpacked upstream source
Perl: dh-make-perl [make] .
Python: python3 setup.py --command-packages=stdeb.command debianize
Ruby: dh-make-ruby
npm: not supported
Haskell: cabal-debian --official (see ?the step-by-step guide)
ELPA: dh-make-elpa [make]
- Debianize (without building source)
Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST}
Python: not supported
Ruby: gem2deb --only-source-dir GEMNAME|GEMFILE
npm: npm2deb create PKGNAME
Haskell, ELPA: not supported, need unpacked source
- Debianize and build source package
Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build-source or cpan2dsc MODULE
Python: py2dsc DISTFILE
Ruby: gem2deb --only-debian-source GEMNAME|GEMFILE
npm, Haskell, ELPA: not supported
- Debianize and build binary packages
Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build or cpan2deb MODULE
Python: py2dsc-deb DISTFILE
Ruby: gem2deb GEMNAME|GEMFILE
npm, Haskell, ELPA: not supported
- Debianize, build, install
Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --install
Python: pypi-install NAME
Ruby: not supported
npm, Haskell, ELPA: not supported
- Refresh an already created package, moving old files to .bak:
All: cme migrate dpkg or cme fix dpkg
Perl: dh-make-perl refresh
Python: not supported
Ruby: dh-make-ruby -w
npm: not supported
Haskell: cabal-debian --official --upgrade
ELPA: not yet
See also
alien converts RPM/etc binary packages to deb binary packages
checkinstall tracks files created or modified by your installation script
game-data-packager converts non-free game data files to Debian binary packages
ognibuild: ogni info --explain --resolve=apt tries to auto-discover the buildsystem
spec2deb was an attempt to convert Fedora spec files to Debian
Meetings
- Debian Reunion 2022: