---
name: "dpkg-build-api"
section: "7"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dpkg-build-api"
---

# dpkg-build-api(7)

source package dpkg build API level

## NAME

dpkg-build-api - source package dpkg build API level

## SYNOPSIS

```
 Build-Depends:
  dpkg-build-api (= 1),
```

## DESCRIPTION

The source package dpkg build API level, defines a versioned interface for source packages, where each API level provides specific behaviors and guarantees.

These interfaces can then be adopted by packages in a gradual way, and phased out more easily than with global behavior changes.

The declaration of this API level is done through build-dependencies, in one of **Build-Depends**, **Build-Depends-Indep** or **Build-Depends-Arch**, or via the environment variable **DPKG\_BUILD\_API**, which will override these if both are present, and might emit a warning in case they are different.

## API LEVELS

- v2

  This level is still under development, and cannot be declared via build-dependencies.

- v1

  This is the recommended level. Since dpkg 1.22.0.

  Changes from v0 are:

  - •

    **dpkg-shlibdeps** no longer uses the **LD\_LIBRARY\_PATH** environment variable. The **-l** option should be used instead.

  - •

    **dpkg-buildpackage** defaults to **Rules-Requires-Root** value **no**. To restore the **v0** behavior (from before dpkg 1.22.13) **Rules-Requires-Root** should be set to **binary-targets**.

  - •

    **dpkg-buildpackage** expects all required *debian/rules* targets to be supported and no longer has backwards compatibility fallback code. The required targets are **clean**, **build**, **build-indep**, **build-arch**, **binary-indep** and **binary-arch**.

  - •

    **vendor.mk** defaults to using **dpkg\_vendor\_derives\_from\_v1** for the **dpkg\_vendor\_derives\_from** macro. To restore the **v0** behavior set **dpkg\_vendor\_derives\_from** to **dpkg\_vendor\_derives\_from\_v0**.

  - •

    **default.mk** defaults to including **buildtools.mk**.

- v0

  This is the current global level, equivalent to not specifying one. The interfaces and behaviors provided are subject to the normal global interface updates, which tend to require longer deprecation cycles and/or coordinated transitions.

## SEE ALSO

[**deb-src-control**(5)](/deb-src-control/5.md).
