对 package-1.0.tar.gz,一个包含了简单的、符合 GNU 编码标准 和 FHS(文件系统层级规范) 的 C 语言源代码的程序来说,它在 Debian 下打包工作可以按照下列流程,使用 debmake 命令进行:
$ tar -xvzf package-1.0.tar.gz $ cd package-1.0 $ debmake ... Make manual adjustments of generated configuration files $ debuild
如果跳过了对生成的配置文件的手工调整流程,则最终生成的二进制软件包将缺少有意义的软件包描述信息,但是仍然能为 dpkg 命令所使用,在本地部署环境下正常工作。
![]() |
小心 |
---|---|
The debmake command only provides good template files. These template files must be manually adjusted to their perfection to comply with the strict quality requirements of the Debian archive, if the generated package is intended for general consumption. |
If you are new to Debian packaging, do not worry about the details and just get the big picture instead.
If you have been exposed to Debian packaging, this looks very much like the dh_make command. This is because the debmake command is intended to replace functions offered historically by the dh_make command. [3]
The debmake command is designed with the following features:
现代的打包风格
灵活性
合理的默认行为
额外的功能
debmake 命令将大多数重量级工作分派给了其后端软件包:debhelper、dpkg-dev、devscripts、pbuilder,等等。
![]() |
提示 |
---|---|
Make sure to protect the arguments of the -b, -f, -l, and -w options from shell interference by quoting them properly. |
![]() |
提示 |
---|---|
非本土软件包是标准的 Debian 软件包。 |
![]() |
提示 |
---|---|
The detailed log of all the package build examples in this document can be obtained by following the instructions in 第 8.14 节 “Details”. |
![]() |
注意 |
---|---|
所产生的 debian/copyright 文件,以及 -c(第 6.3 节 “debmake -cc”)和 -k(第 6.4 节 “debmake -k”)选项的输出都涉及了对版权和授权信息的启发式操作。它们具有局限性,可能会输出某些错误的结果。 |
[3] The deb-make command was popular before the dh_make command. The current debmake package starts its version from 4.0 to avoid version overlaps with the obsolete debmake package, which provided the deb-make command.