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.
39 =item B<-c>I<control-file>
41 Specifies the main source control file to read information from.
42 The default is F<debian/control>.
46 Show the usage message and exit.
50 Show the version and exit.
58 =item B<DPKG_BUILD_API>
60 The build API level to use.
61 This is intended to be used internally by the tools executed from
62 F<debian/rules> to avoid having to parse F<debian/control> multiple times,
63 and not to set the global build API level from F<debian/rules>,
64 otherwise build drivers (such as L<dpkg-buildpackage(1)>) cannot access it.
70 =head2 Packaging support
74 =item B<%PKGDATADIR%/buildapi.mk>
76 Makefile snippet that will parse the build API level.