summaryrefslogtreecommitdiffstats
path: root/man/dpkg-gencontrol.pod
blob: 9601e6a60e2cbf3e6150e4e98f0be38dadc4a928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# dpkg manual page - dpkg-gencontrol(1)
#
# Copyright © 1995-1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
# Copyright © 2000 Wichert Akkerman <wakkerma@debian.org>
# Copyright © 2006, 2012-2013, 2015 Guillem Jover <guillem@debian.org>
# Copyright © 2007-2008 Raphaël Hertzog <hertzog@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-gencontrol - generate Debian control files

=head1 SYNOPSIS

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

=head1 DESCRIPTION

B<dpkg-gencontrol>
reads information from an unpacked Debian source tree and generates a
binary package control file (which defaults to debian/tmp/DEBIAN/control);
during this process it will simplify the relation fields.

Thus
B<Pre-Depends>, B<Depends>, B<Recommends> and B<Suggests>
are simplified in this
order by removing dependencies which are known to be true according to the
stronger dependencies already parsed. It will also remove any self-dependency
(in fact it will remove any dependency which evaluates to true given the
current version of the package as installed). Logically it keeps the
intersection of multiple dependencies on the same package. The order
of dependencies is preserved as best as possible: if any dependency
must be discarded due to another dependency appearing further
in the field, the superseding dependency will take the place of the
discarded one.

The other relation fields
(B<Enhances>, B<Conflicts>, B<Breaks>, B<Replaces> and B<Provides>)
are also simplified individually by computing the union of the various
dependencies when a package is listed multiple times in the field.

B<dpkg-gencontrol>
also adds an entry for the binary package to
B<debian/files>.

=head1 OPTIONS

=over

=item B<-v>I<version>

Sets the version number of the binary package which will be generated.

=item B<-V>I<name>B<=>I<value>

Set an output substitution variable. See B<deb-substvars>(5) for
discussion of output substitution.

=item B<-T>I<substvars-file>

Read substitution variables in
I<substvars-file>;
the default is
B<debian/substvars>.
This option can be used multiple times to read substitution variables from
multiple files (since dpkg 1.15.6).

=item B<-D>I<field>B<=>I<value>

Override or add an output control file field.

=item B<-U>I<field>

Remove an output control file field.

=item B<-c>I<control-file>

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>

Read or write the list of files to be uploaded here, 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<-p>I<package>

Generate information for the binary package
I<package>.
If the source control file lists only one binary package then this
option may be omitted; otherwise it is essential to select which
binary package's information to generate.

=item B<-n>I<filename>

Assume the filename of the package will be
I<filename>
instead of the normal package_version_arch.deb filename.

=item B<-is>, B<-ip>, B<-isp>

These options are ignored for compatibility with older versions of the dpkg
build scripts but are now deprecated. Previously they were used to tell
B<dpkg-gencontrol> to include the Section and Priority fields in the
control file. This is now the default behaviour. If you want to
get the old behaviour you can use the
B<-U>
option to delete the fields from the control file.

=item B<-P>I<package-build-dir>

Scan
I<package-build-dir>
instead of
B<debian/tmp>.
This value is used to find the default value of the
B<Installed-Size>
substitution variable and control file field,
and for the default location of the output file.

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

Print the control file to standard output (or I<filename> if specified,
since dpkg 1.17.2), rather than to
B<debian/tmp/DEBIAN/control>
(or
I<package-build-dir>B</DEBIAN/control>
if
B<-P>
was used).

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

Show the usage message and exit.

=item B<--version>

Show the version and exit.

=back

=head1 ENVIRONMENT

=over

=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/control>

The main source control information file, giving version-independent
information about the source package and the binary packages it can
produce.

=item B<debian/files>

The list of generated files which are part of the upload being
prepared.
B<dpkg-gencontrol>
adds the presumed filenames of binary packages whose control files it
generates here.

=back

=head1 SEE ALSO

B<deb-substvars>(5),
B<deb-src-control>(5),
B<deb-changelog>(5),
B<deb-control>(5).