LinuxCommandLibrary

dpkg-buildpackage

Debian package build tool

TLDR

Build package

$ dpkg-buildpackage
copy
Build unsigned
$ dpkg-buildpackage -us -uc
copy
Build binary only
$ dpkg-buildpackage -b
copy
Build source only
$ dpkg-buildpackage -S
copy
Build with parallelism
$ dpkg-buildpackage -j[4]
copy
Build without cleaning
$ dpkg-buildpackage -nc
copy
Specify key for signing
$ dpkg-buildpackage -k[keyid]
copy

SYNOPSIS

dpkg-buildpackage [options]

DESCRIPTION

dpkg-buildpackage builds Debian packages from source. It orchestrates the full build process including extracting source, running the build system, and creating .deb files.
The tool handles dependencies, runs debian/rules targets, calls dpkg-source for source packages, and dpkg-genchanges for upload files. It's the standard way to build Debian packages.

PARAMETERS

-b

Binary-only build.
-S
Source-only build.
-F
Full build (source and binary).
-us
Don't sign source package.
-uc
Don't sign changes file.
-j n
Parallel jobs.
-nc
Don't clean before build.
-tc
Clean after build.
-k keyid
GPG key for signing.
-r cmd
Use cmd to gain root.
-d
Don't check dependencies.
--build= type
Specify build type.

CAVEATS

Requires build dependencies installed. Signing needs GPG key. Must run in package source directory. Clean environment recommended for reproducible builds.

HISTORY

dpkg-buildpackage is part of the dpkg suite, the core of Debian package management since 1994. It has evolved with Debian's packaging practices, adding features for source formats, signing, and cross-compilation over the years.

SEE ALSO

dpkg(1), dpkg-source(1), debuild(1), pbuilder(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community