自定义 debian/rules 文件
在创建 Debian 包时,你可能需要自定义 debian/rules 文件。以下是一个示例 debian/rules 文件:
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- --with-kitchen-sink
override_dh_auto_build:
make world
#!/usr/bin/make -f:指定使用make作为解释器来执行这个文件。%::通配符目标,表示所有目标。dh $@将调用debhelper工具链中的适当命令来处理目标。override_dh_auto_configure::覆盖目标,用于自定义dh_auto_configure的行为。dh_auto_configure -- --with-kitchen-sink:传递--with-kitchen-sink选项给dh_auto_configure,用于配置构建。
override_dh_auto_build::覆盖目标,用于自定义dh_auto_build的行为。make world:调用make工具,并执行world目标来构建软件包。
通过这些步骤,你可以自定义 debian/rules 文件,以满足特定的构建需求。