dpkg-buildapi(1) dpkg suite dpkg-buildapi(1)

# [NAME](#NAME)

dpkg-buildapi - returns the build API level to use during package build

# [SYNOPSIS](#SYNOPSIS)

**dpkg-buildapi** \[*option*...] \[*command*]

# [DESCRIPTION](#DESCRIPTION)

**dpkg-buildapi** is a tool to retrieve the [**dpkg-build-api**(7)](/man/os/dpkg/dpkg-build-api.7) level to use during build of source Debian packages.

This program was introduced in dpkg 1.22.0.

# [COMMANDS](#COMMANDS)

[**--help**](#help)

Show the usage message and exit.

[**--version**](#version)

Show the version and exit.

# [OPTIONS](#OPTIONS)

[**-ccontrol-file**](#c)

Specifies the main source control file to read information from. The default is *debian/control*.

# [ENVIRONMENT](#ENVIRONMENT)

[**DPKG\_BUILD\_API**](#DPKG_BUILD_API)

The build API level to use. This is intended to be used internally by the tools executed from *debian/rules* to avoid having to parse *debian/control* multiple times, and not to set the global build API level from *debian/rules*, otherwise build drivers (such as [**dpkg-buildpackage**(1)](/man/os/dpkg/dpkg-buildpackage.1)) cannot access it.

[**DPKG\_COLORS**](#DPKG_COLORS)

Sets the color mode. The currently accepted values are: **auto** (default), **always** and **never**.

[**DPKG\_NLS**](#DPKG_NLS)

If set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. The accepted values are: **0** and **1** (default).

# [FILES](#FILES)

## [Packaging support](#Packaging_support)

**/usr/share/dpkg/buildapi.mk**

Makefile snippet that parses the build API level into a variable.

2026-09-09 1.23.11-dirty

---

Document: dpkg-buildapi(1) from dpkg 1.23.11-r2 (Chainguard OS)
Source: https://git.dpkg.org/git/dpkg/dpkg.git
