$linuxjunkies
>

debuild(1)

Build a Debian package from source, handling dependencies and package creation automatically.

UbuntuDebianFedoraArch

Synopsis

debuild [OPTION]... [-- dpkg-buildpackage-options]

Description

debuild is a wrapper around dpkg-buildpackage that automates Debian package building. It sets up the build environment, installs build dependencies, runs the build process, and signs the resulting changes file. It is the standard tool for Debian developers to build packages locally.

debuild reads the debian/changelog file to determine the package version and distribution, then invokes dpkg-buildpackage with appropriate options. It can automatically install build-depends and build-conflicts packages, and handles source-only builds, binary-only builds, and full builds.

Common options

FlagWhat it does
-Sbuild source-only package (creates .dsc and .tar.gz, no binaries)
-bbuild binary package only (skip source package creation)
-Abuild architecture-independent packages only
-Bbuild architecture-dependent packages only
-usdo not sign source package (.dsc file)
-ucdo not sign changes file (.changes file)
-iignore debian/changelog when checking source package pristineness
-dskip installing build dependencies (assume they are already installed)
--lintian-opts=OPTSpass additional options to lintian checks after build
--no-lintianskip lintian checks after build completion

Examples

build complete Debian package (source and binary), installing build deps, signing output

debuild

build source package only for upload to Debian archive or PPA

debuild -S

build binary package without signing, useful for local testing

debuild -b -uc -us

build binary package assuming build dependencies are already installed

debuild -d -b

build architecture-dependent packages only, skipping lintian checks

debuild -B --no-lintian

build architecture-independent packages without signing

debuild -A -us -uc

Related commands