dpkg-buildapi(1)

dpkg-buildapi1

Returns the build api level to use during package build

Usage

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

Overview

dpkg-buildapi is a tool to retrieve the dpkg-build-api(7) level to use during build of source Debian packages.

This program was introduced in dpkg 1.22.0.

Commands

--help

Show the usage message and exit.

--version

Show the version and exit.

Options

-ccontrol-file

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

Environment

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)) cannot access it.

DPKG_COLORS

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

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

Packaging support

/usr/share/dpkg/buildapi.mk

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

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

From dpkg 1.23.11-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.