Dpkg::Vendor: Make the add_build_flags() a non-private method
[dpkg.git] / man / dpkg-build-api.pod
blobe50cbf5b85fc94369253865066271cb9195b3e0f
1 # dpkg manual page - dpkg-build-api(7)
3 # Copyright © 2021-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/>.
18 =encoding utf8
20 =head1 NAME
22 dpkg-build-api - source package dpkg build API level
24 =head1 SYNOPSIS
26  Build-Depends:
27   dpkg-build-api (= 1),
29 =head1 DESCRIPTION
31 The source package dpkg build API level, defines a versioned interface for
32 source packages, where each API level provides specific behaviors and
33 guarantees.
35 These interfaces can then be adopted by packages in a gradual way,
36 and phased out more easily than with global behavior changes.
38 The declaration of this API level is done through build-dependencies, in
39 one of B<Build-Depends>, B<Build-Depends-Indep> or B<Build-Depends-Arch>,
40 or via the environment variable B<DPKG_BUILD_API>, which will override these
41 if both are present, and might emit a warning in case they are different.
43 =head1 API LEVELS
45 =over
47 =item v2
49 This level is still under development, and cannot be declared via
50 build-dependencies.
52 =item v1
54 This is the recommended level.
55 Since dpkg 1.22.0.
57 Changes from v0 are:
59 =over
61 =item *
63 B<dpkg-shlibdeps> no longer uses the B<LD_LIBRARY_PATH> environment variable.
64 The B<-l> option should be used instead.
66 =item *
68 B<dpkg-buildpackage> defaults to B<Rules-Requires-Root> value B<no>.
69 To restore the B<v0> behavior B<Rules-Requires-Root> should be set to
70 B<binary-targets>.
72 =item *
74 B<dpkg-buildpackage> expects all required F<debian/rules> targets to be
75 supported and no longer has backwards compatibility fallback code.
76 The required targets are B<clean>, B<build>, B<build-indep>, B<build-arch>,
77 B<binary-indep> and B<binary-arch>.
79 =item *
81 B<vendor.mk> defaults to using B<dpkg_vendor_derives_from_v1> for the
82 B<dpkg_vendor_derives_from> macro.
83 To restore the B<v0> behavior set B<dpkg_vendor_derives_from> to
84 B<dpkg_vendor_derives_from_v0>.
86 =item *
88 B<default.mk> defaults to including B<buildtools.mk>.
90 =back
92 =item v0
94 This is the current global level, equivalent to not specifying one.
95 The interfaces and behaviors provided are subject to the normal global
96 interface updates, which tend to require longer deprecation cycles and/or
97 coordinated transitions.
99 =back
101 =head1 SEE ALSO
103 L<deb-src-control(5)>.