1 # dpkg manual page - dpkg-buildapi(1)
3 # Copyright © 2023 Guillem Jover <guillem@debian.org>
5 # This is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
22 dpkg-buildapi - returns the build API level to use during package build
26 B<dpkg-buildapi> [I<option>...] [I<command>]
30 B<dpkg-buildapi> is a tool to retrieve the L<dpkg-build-api(7)> level to
31 use during build of source Debian packages.
33 This program was introduced in dpkg 1.22.0.
41 Show the usage message and exit.
45 Show the version and exit.
53 =item B<-c>I<control-file>
55 Specifies the main source control file to read information from.
56 The default is F<debian/control>.
64 =item B<DPKG_BUILD_API>
66 The build API level to use.
67 This is intended to be used internally by the tools executed from
68 F<debian/rules> to avoid having to parse F<debian/control> multiple times,
69 and not to set the global build API level from F<debian/rules>,
70 otherwise build drivers (such as L<dpkg-buildpackage(1)>) cannot access it.
76 =head2 Packaging support
80 =item B<%PKGDATADIR%/buildapi.mk>
82 Makefile snippet that will parse the build API level.