AutomaticPackagingTools - Debian Wiki

4 min read Original article ↗

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.

Contents

  1. Language-agnostic tools
  2. Language-specific tools
    1. Notes
    2. Usage
  3. See also
    1. Meetings

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

dh-make-perl

gem2deb

python3-stdeb

pypi2deb

npm2deb 1

cabal-debian

dh-make-golang

dh-make-elpa

Upstream repository

N/A

CPAN.org, Alioth

Rubygems.org

PyPI

PyPI

npm

Hackage

varies

MELPA

Debian guide

list

guide

guide

guide

guide

guide

guide

guide

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.

debian/upstream/metadata

ITP mail template

❌(use dpt gen-itp)

recursive

no 7

Notes

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


CategoryPackaging CategorySoftware