dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-gencontrol.man
CommitLineData
1479465f
GJ
1.\" dpkg manual page - dpkg-gencontrol(1)
2.\"
3.\" Copyright © 1995-1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
4.\" Copyright © 2000 Wichert Akkerman <wakkerma@debian.org>
5.\" Copyright © 2006, 2012-2013, 2015 Guillem Jover <guillem@debian.org>
6.\" Copyright © 2007-2008 Raphaël Hertzog <hertzog@debian.org>
7.\"
8.\" This is free software; you can redistribute it and/or modify
9.\" it under the terms of the GNU General Public License as published by
10.\" the Free Software Foundation; either version 2 of the License, or
11.\" (at your option) any later version.
12.\"
13.\" This is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public License
19.\" along with this program. If not, see <https://www.gnu.org/licenses/>.
20.
21.TH dpkg\-gencontrol 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
22.nh
23.SH NAME
24dpkg\-gencontrol \- generate Debian control files
25.
26.SH SYNOPSIS
27.B dpkg\-gencontrol
28.RI [ option ...]
29.
30.SH DESCRIPTION
31.B dpkg\-gencontrol
32reads information from an unpacked Debian source tree and generates a
33binary package control file (which defaults to debian/tmp/DEBIAN/control);
34during this process it will simplify the relation fields.
35.sp
36Thus
37.BR Pre\-Depends ", " Depends ", " Recommends " and " Suggests
38are simplified in this
39order by removing dependencies which are known to be true according to the
40stronger dependencies already parsed. It will also remove any self-dependency
41(in fact it will remove any dependency which evaluates to true given the
42current version of the package as installed). Logically it keeps the
43intersection of multiple dependencies on the same package. The order
44of dependencies is preserved as best as possible: if any dependency
45must be discarded due to another dependency appearing further
46in the field, the superseding dependency will take the place of the
47discarded one.
48.sp
49The other relation fields
50.RB ( Enhances ", " Conflicts ", " Breaks ", " Replaces " and " Provides )
51are also simplified individually by computing the union of the various
52dependencies when a package is listed multiple times in the field.
53.sp
54.B dpkg\-gencontrol
55also adds an entry for the binary package to
56.BR debian/files .
57.
58.SH OPTIONS
59.TP
60.BI \-v version
61Sets the version number of the binary package which will be generated.
62.TP
63.BI \-V name = value
64Set an output substitution variable. See \fBdeb\-substvars\fP(5) for
65discussion of output substitution.
66.TP
67.BI \-T substvars-file
68Read substitution variables in
69.IR substvars-file ;
70the default is
71.BR debian/substvars .
72This option can be used multiple times to read substitution variables from
73multiple files (since dpkg 1.15.6).
74.TP
75.BI \-D field = value
76Override or add an output control file field.
77.TP
78.BI \-U field
79Remove an output control file field.
80.TP
81.BI \-c control-file
82Specifies the main source control file to read information from. The
83default is
84.BR debian/control .
85.TP
86.BI \-l changelog-file
87Specifies the changelog file to read information from. The
88default is
89.BR debian/changelog .
90.TP
91.BI \-f files-list-file
92Read or write the list of files to be uploaded here, rather than using
93.BR debian/files .
94.TP
95.BI \-F changelog-format
96Specifies the format of the changelog. See \fBdpkg\-parsechangelog\fP(1)
97for information about alternative formats.
98.TP
99.BI \-p package
100Generate information for the binary package
101.IR package .
102If the source control file lists only one binary package then this
103option may be omitted; otherwise it is essential to select which
104binary package's information to generate.
105.TP
106.BI \-n filename
107Assume the filename of the package will be
108.I filename
109instead of the normal package_version_arch.deb filename.
110.TP
111.BR \-is ", " \-ip ", " \-isp
112These options are ignored for compatibility with older versions of the dpkg
113build scripts but are now deprecated. Previously they were used to tell
114\fBdpkg\-gencontrol\fP to include the Section and Priority fields in the
115control file. This is now the default behaviour. If you want to
116get the old behaviour you can use the
117.B \-U
118option to delete the fields from the control file.
119.TP
120.BI \-P package-build-dir
121Tells
122.B dpkg\-source
123that the package is being built in
124.I package-build-dir
125instead of
126.BR debian/tmp .
127This value is used to find the default value of the
128.B Installed\-Size
129substitution variable and control file field (using
130.BR du ),
131and for the default location of the output file.
132.TP
133.BR \-O [\fIfilename\fP]
134Print the control file to standard output (or \fIfilename\fP if specified,
135since dpkg 1.17.2), rather than to
136.B debian/tmp/DEBIAN/control
137(or
138.IB package-build-dir /DEBIAN/control
139if
140.B \-P
141was used).
142.TP
143.BR \-? ", " \-\-help
144Show the usage message and exit.
145.TP
146.BR \-\-version
147Show the version and exit.
148.
149.SH FILES
150.TP
151.B debian/control
152The main source control information file, giving version-independent
153information about the source package and the binary packages it can
154produce.
155.TP
156.B debian/files
157The list of generated files which are part of the upload being
158prepared.
159.B dpkg\-gencontrol
160adds the presumed filenames of binary packages whose control files it
161generates here.
162.SH SEE ALSO
163.ad l
164.BR deb\-substvars (5),
165.BR deb\-src\-control (5),
166.BR deb\-changelog (5),
167.BR deb\-control (5).