Dpkg::BuildDriver::DebianRules(3perl) libdpkg-perl Dpkg::BuildDriver::DebianRules(3perl)

# [NAME](#NAME)

Dpkg::BuildDriver::DebianRules - build a Debian package using debian/rules

# [DESCRIPTION](#DESCRIPTION)

This class is used by dpkg-buildpackage to drive the build of a Debian package, using *debian/rules*.

**Note**: This is a private module, its API can change at any time.

# [METHODS](#METHODS)

$bd = Dpkg::BuildDriver::DebianRules-&gt;new(%opts)

Create a new Dpkg::BuildDriver::DebianRules object.

Supports or requires the same Dpkg::BuildDriver-&gt;**new()** options.

$bd-&gt;**pre\_check()**

Perform build driver specific checks, before anything else.

This checks whether the *debian/rules* file is executable, and if not then make it so.

$bool = $bd-&gt;need\_build\_task($build\_task, $binary\_task)

Returns whether we need to use the build task.

**Note**: This method is needed as long as we support building as root-like. Once that is not needed this method will be deprecated.

$bd-&gt;run\_build\_task($build\_task, $binary\_task)

Executes the build task for the build.

**Note**: This method is needed as long as we support building as root-like. Once that is not needed this method will be deprecated.

$bd-&gt;run\_task($task)

Executes the given task for the build.

# [CHANGES](#CHANGES)

## [Version 0.xx](#Version_0.xx)

This is a private module.

2026-09-09 1.23.11-dirty

---

Document: Dpkg::BuildDriver::DebianRules(3perl) from dpkg 1.23.11-r2 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
