Home

dpkgbuildpackage

dpkg-buildpackage is a command-line tool included with the dpkg-dev package used to build Debian source and binary packages from a debianized source tree. It is typically run from the top-level directory of a source package, which contains a debian/ directory with packaging metadata such as control, rules, and changelog. The tool invokes the package’s build system, usually via the debian/rules makefile, to compile code, assemble binaries, and produce the package artifacts.

The build output is placed in the parent directory of the source tree and can include binary

Signing and authenticity are supported. If signing is configured, dpkg-buildpackage can sign the changes file and/or

The tool is a central part of the Debian packaging workflow and is commonly used alongside tools

package
files
(.deb),
source
package
components
(tarballs
and
the
.dsc
descriptor),
and
a
changes
file
(.changes)
that
records
the
produced
packages
and
their
metadata.
dpkg-buildpackage
supports
building
either
binary
packages,
source
packages,
or
both,
depending
on
the
options
used.
the
source
package
with
a
GnuPG
key;
options
exist
to
disable
signing
for
scenarios
where
signing
is
not
desired.
Typical
usage
patterns
include
building
binary
packages
only
(-b),
building
the
source
package
only
(-S),
or
building
both
(-sa)
while
optionally
skipping
signing
(-us
-uc).
such
as
debhelper,
pbuilder,
and
sbuild
to
manage
clean
build
environments
and
ensure
reproducible
builds.
It
relies
on
the
source’s
declared
build
dependencies
and
environment
to
produce
installable
Debian
packages
suitable
for
distribution
or
upload.