# dpkg manual page - dpkg-genbuildinfo(1)
#
# Copyright © 1995-1996 Ian Jackson <ian@chiark.chu.cam.ac.uk>
# Copyright © 2000 Wichert Akkerman <wakkerma@debian.org>
# Copyright © 2008-2010 Raphaël Hertzog <hertzog@debian.org>
# Copyright © 2006-2016 Guillem Jover <guillem@debian.org>
# Copyright © 2015 Jérémy Bobbio <lunar@debian.org>
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

=encoding utf8

=head1 NAME

dpkg-genbuildinfo - generate Debian .buildinfo files

=head1 SYNOPSIS

B<dpkg-genbuildinfo>
[I<option>...]

=head1 DESCRIPTION

B<dpkg-genbuildinfo>
reads information from an unpacked and built Debian source tree and
from the files it has generated and generates a Debian control
file describing the build environment and the build artifacts
(B<.buildinfo> file).

This program was introduced in dpkg 1.18.11.

=head1 OPTIONS

=over

=item B<--build=>I<type>

Specifies the build I<type> from a comma-separated list of components.

The allowed values are:

=over

=item B<any>

Generate build information including unqualified build dependencies
(B<Build-Depends>) and architecture specific build dependencies
(B<Build-Depends-Arch>).

=item B<all>

Generate build information including unqualified build dependencies
(B<Build-Depends>) and architecture independent build dependencies
(B<Build-Depends-Indep>).

=item B<source>

Effectively ignored; generate build information with just the unqualified
build dependencies (B<Build-Depends>).

=item B<binary>

Generate build information with all three types of build dependencies.
This is an alias for B<any,all>.

=item B<full>

Generate build information with all three types of build dependencies.
This is an alias for B<any,all,source>, and the same as the default
case when no build option is specified.

=back

=item B<-c>I<controlfile>

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

=item B<-l>I<changelog-file>

Specifies the changelog file to read information from. The
default is
B<debian/changelog>.

=item B<-f>I<files-list-file>

Specifies where is the list of files that have been produced by the build,
rather than using
B<debian/files>.

=item B<-F>I<changelog-format>

Specifies the format of the changelog. See B<dpkg-parsechangelog>(1)
for information about alternative formats.

=item B<-O>[I<filename>]

Print the buildinfo file to standard output (or I<filename> if specified)
rather than to
I<dir>B</>I<source-name>B<_>I<binary-version>B<_>I<arch>B<.buildinfo>
(where I<dir> is B<..> by default or I<upload-files-dir>
if B<-u> was used).

=item B<-u>I<upload-files-dir>

Look for the files to be uploaded in
I<upload-files-dir>
rather than
B<..>
(B<dpkg-genbuildinfo> needs to find these files so that it can include
their sizes and checksums in the B<.buildinfo> file).

=item B<--always-include-kernel>

By default, the B<Build-Kernel-Version> field will not be written out.

Specify this option (since dpkg 1.19.0) to always write a
B<Build-Kernel-Version> field when generating the B<.buildinfo>.

=item B<--always-include-path>

By default, the B<Build-Path> field will only be written if the current
directory starts with an allowed pattern.

On Debian and derivatives the pattern matches on B</build/> at the start
of the pathname.

Specify this option to always write a B<Build-Path> field when generating
the B<.buildinfo>.

=item B<--admindir=>I<dir>

Change the location of the B<dpkg> database. The default location is
I</var/lib/dpkg>.

=item B<-q>

B<dpkg-genbuildinfo>
might produce informative messages on standard error.
B<-q>
suppresses these messages.

=item B<-?>, B<--help>

Show the usage message and exit.

=item B<--version>

Show the version and exit.

=back

=head1 ENVIRONMENT

=over

=item B<DEB_BUILD_OPTIONS>

This variable can be used to enable or disable various features that affect
the information included in the .buildinfo file, via the B<buildinfo>
option (since dpkg 1.18.19).
This option contains a comma-separated list of features, prefixed with the
‘B<+>’ or ‘B<->’ modifiers, to denote whether to enable or disable
them.
The special feature “B<all>” can be used to enable or disable all other
features.
The feature “B<path>” controls whether to unconditionally include the
B<Build-Path> field.

=item B<DPKG_COLORS>

Sets the color mode (since dpkg 1.18.5).
The currently accepted values are: B<auto> (default), B<always> and
B<never>.

=item B<DPKG_NLS>

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

=back

=head1 FILES

=over

=item B<debian/files>

The list of generated files.
B<dpkg-genbuildinfo>
reads the data here when producing a
B<.buildinfo>
file.

=back

=head1 SEE ALSO

B<deb-buildinfo>(5).
