Let’s look at the fictive debianized Foo::Bar
at version 0.03.
::
by -
(dash), prepend lib
and append
-perl
: module Foo::Bar
becomes package libfoo-bar-perl
App::Cleo
is packaged as just cleo
.
_
(underscore; compared to dash as used for CPAN modules).
0.03
) and Debian revision (e.g. 1
) are
delimited by -
(dash).
libfoo-bar-perl_0.03-1_all.deb
(pure perl) or
libfoo-bar-perl_0.03-1_$ARCH.deb
(XS module),
e.g. libfoo-bar-perl_0.03-1_amd64.deb
on x86_64.
libfoo-bar-perl-dbgsym_0.03-1_$ARCH.deb
(automatic debug symbols
for XS module)
libfoo-bar-perl_0.03-1.dsc
(contains
some meta data and the hashsums of the other files mentioned below)
libfoo-bar-perl_0.03.orig.tar.$COMPRESSION
,
e.g. libfoo-bar-perl_0.03.orig.tar.xz
or
libfoo-bar-perl_0.03.orig.tar.gz
libfoo-bar-perl_0.03-1.debian.tar.xz
(formerly
libfoo-bar-perl_0.03-1.diff.gz
): Contains the actual packaging.
debian/changelog
: Packaging changelog, defines actual version of
the package.
debian/control
: Static source and binary package metadata.
debian/copyright
: License declaration (machine-readable)
debian/rules
: Makefile which defines what happens on package
build. Nowadays only contains one default rule using dh
aka
debhelper
plus what differs from the default.
make -f debian/rules
clean
or—if the file is executable—like debian/rules clean
.
debian/watch
: Where to watch for new upstream releases.
dh-make-perl
(in unpacked Perl module source): generates basic
Debian packaging based on CPAN meta data found in the source code.
dh-make-perl --cpan Foo::Bar
: downloads and unpacks CPAN tar ball
first.
git
) for the newly
created source package. Uses a git-buildpackage
branch layout
(upstream
, master
and pristine-tar
).
dh-make-perl --pkg-perl --cpan Foo::Bar
: Sets package Maintainer
to the Debian Perl Group and finetunes package meta data and git
repository for team maintenance.
cpan2dsc Foo:Bar
(also builds a Debian source package using
dpkg-buildpackage -b
)
cpan2deb Foo:Bar
(also builds a Debian binary package using
dpkg-buildpackage -S
)
apt-file search
+ corelist
)
build-essential
: pulls in all packages necessary to build
a minimal Debian package plus GCC.
debhelper
as it’s not strictly necessary.
pkg-perl-tools
: contains the dpt
helper tool for typical
Debian Perl package maintaining tasks. (Run dpt --help
.)
git-buildpackage
aka gbp
: wrapper around git
,
dpkg-buildpackage
, and pristine-tar
.
pristine-tar
: Stores meta data of a tar-ball and everything else
needed to regenerate a tar ball bit by bit in addition to the
contents of the git repository.
dh-dist-zilla
: debhelper
plugin to build Debian packages
directly from a git
checkout of a Dist::Zilla based module.
lintian
: Debian package checker which find about 99% of all common
packaging mistakes, including typos in meta data, man pages,
etc.
adequate
: Checker for installed packages.
autopkgtest
+ package pkg-perl-autopkgtest
: Tools to run a
module’s test suite against the installed package.
blhc
and bls-standalone
: Check build logs for C compilation
issues (i.e. only useful for XS based modules).
cleo
. :-)
Talk to the Debian Perl Group, e.g. on IRC. They are very helpful and always welcome new contributors.
The group already maintains over 3500 CPAN modules as Debian packages.