← 返回命令列表

Linux command

dpkg-buildpackage 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Build package

dpkg-buildpackage

Build unsigned

dpkg-buildpackage -us -uc

Build binary only

dpkg-buildpackage -b

Build source only

dpkg-buildpackage -S

Build with parallelism

dpkg-buildpackage -j[4]

Build without cleaning

dpkg-buildpackage -nc

Specify key for signing

dpkg-buildpackage -k[keyid]

说明

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.

参数

-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.

FAQ

What is the dpkg-buildpackage command used for?

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.

How do I run a basic dpkg-buildpackage example?

Run `dpkg-buildpackage` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -b do in dpkg-buildpackage?

Binary-only build.