Imported Upstream version 1.16.10
[services/dpkg.git] / man / deb-src-control.5
1 .\" dpkg manual page - deb-src-control(5)
2 .\"
3 .\" Copyright © 2010 Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
4 .\" Copyright © 2011 Raphaël Hertzog <hertzog@debian.org>
5 .\" Copyright © 2011-2012 Guillem Jover <guillem@debian.org>
6 .\"
7 .\" This is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 2 of the License, or
10 .\" (at your option) any later version.
11 .\"
12 .\" This is distributed in the hope that it will be useful,
13 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 .\" GNU General Public License for more details.
16 .\"
17 .\" You should have received a copy of the GNU General Public License
18 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 .
20 .TH deb\-src\-control 5 "2012-06-16" "Debian Project" "Debian"
21 .SH NAME
22 deb\-src\-control \- Debian source packages' master control file format
23 .
24 .SH SYNOPSIS
25 control
26 .
27 .SH DESCRIPTION
28 Each Debian source package contains the master "control" file, which contains
29 at least 2 paragraphs, separated by a blank line. The first paragraph lists
30 all information about the source package in general, while each following
31 paragraph describes exactly one binary package. Each paragraph consists of at
32 least one field. A field starts with a fieldname, such as
33 .B Package
34 or
35 .B Section
36 (case insensitive), followed by a colon, the body of the field and a newline.
37 Multi-line fields are also allowed, but each supplementary line, without a
38 fieldname, should start with at least one space. The content of the multi-line
39 fields is generally joined to a single line by the tools (except in the case of
40 the
41 .B Description
42 field, see below). To insert empty lines into a multi-line
43 field, insert a dot after the space. Lines starting with a \fB'#'\fP are
44 treated as comments.
45 .
46 .SH SOURCE FIELDS
47 .TP
48 .BR Source: " \fIsource-package-name\fP (required)"
49 The value of this field is the name of the source package, and should
50 match the name of the source package in the debian/changelog file. A package
51 name must consist only of lower case letters (a-z), digits (0-9), plus (+) and
52 minus (-) signs, and periods (.). Package names must be at least two characters
53 long and must start with an alphanumeric character.
54
55 .TP
56 .BR Maintainer: " \fIfullname-email\fP (required)"
57 Should be in the format "Joe Bloggs <jbloggs@foo.com>", and references the
58 person who currently maintains the package, as opposed to the author of the
59 software or the original packager.
60
61 .TP
62 .BI Uploaders: " fullname-email"
63 Lists all the names and email addresses of co-maintainers of the package, in
64 the same format as the Maintainer field. Multiple co-maintainers should be
65 separated by a comma.
66
67 .TP
68 .BI Standards\-Version: " version-string"
69 This documents the most recent version of the standards (which consists of the
70 Debian Policy Manual and referenced texts from the
71 .B debian\-policy
72 package) this package complies to.
73
74 .TP
75 .BR DM\-Upload\-Allowed: " \fByes\fP|\fBno\fP"
76 This field indicates whether the package can be uploaded by Debian Maintainers
77 appearing in the Maintainer or Uploaders field. The default value is "no".
78
79 .TP
80 .BI Homepage: " url"
81 The upstream project home page URL.
82
83 .TP
84 .BI Bugs: " url"
85 The \fIurl\fP of the bug tracking system for this package. The current
86 used format is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
87 \fBdebbugs://bugs.debian.org\fP. This field is usually not needed.
88
89 .TP
90 .BI Vcs\-*: " url"
91 The \fIurl\fP of the Version Control System repository used to maintain this
92 package. Currently supported are \fBArch\fP, \fBBzr\fP (Bazaar), \fBCvs\fP,
93 \fBDarcs\fP, \fBGit\fP, \fBHg\fP (Mercurial), \fBMtn\fP (Monotone) and
94 \fBSvn\fP (Subversion). Usually this field points to the latest version
95 of the package, such as the main branch or the trunk.
96
97 .TP
98 .BI Vcs\-Browser: " url"
99 The \fIurl\fP of a webinterface to browse the Version Control System
100 repository.
101
102 .TP
103 .BI Origin: " name"
104 The name of the distribution this package is originating from. This field is
105 usually not needed.
106
107 .TP
108 .BI Section: " section"
109 This is a general field that gives the package a category based on the
110 software that it installs. Some common sections are "utils", "net",
111 "mail", "text", "x11", etc.
112
113 .TP
114 .BI Priority: " priority"
115 Sets the importance of this package in relation to the system as a whole.
116 Common priorities are "required", "standard", "optional", "extra", etc.
117
118 In Debian, the
119 .B Section
120 and
121 .B Priority
122 fields have a defined set of accepted values based on the Policy Manual.
123 A list of these values can be obtained from the latest version of the
124 .B debian\-policy
125 package.
126
127 .TP
128 .BI Build\-Depends: " package-list"
129 A list of packages that need to be installed and configured to be able
130 to build the source package. Including a dependency in this list has
131 the same effect as including it in both \fBBuild\-Depends\-Arch\fP and
132 \fBBuild\-Depends\-Indep\fP, with the additional effect of being used
133 for source-only builds.
134
135 .TP
136 .BI Build\-Depends\-Arch: " package list"
137 Same as \fBBuild\-Depends\fP, but they are only needed when building the
138 architecture dependent packages. The \fBBuild\-Depends\fP are also
139 installed in this case. This field was introduced in dpkg version
140 1.16.4; in order to build with older dpkg versions, \fBBuild\-Depends\fP
141 should be used instead.
142
143 .TP
144 .BI Build\-Depends\-Indep: " package-list"
145 Same as \fBBuild\-Depends\fP, but they are only needed when building the
146 architecture independent packages. The \fBBuild\-Depends\fP are also
147 installed in this case.
148
149 .TP
150 .BI Build\-Conflicts: " package list"
151 A list of packages that should not be installed when the package is
152 built, for example because they interfere with the build system used.
153 Including a dependency in this list has the same effect as including
154 it in both \fBBuild\-Conflicts\-Arch\fP and
155 \fBBuild\-Conflicts\-Indep\fP, with the additional effect of being
156 used for source-only builds.
157
158 .TP
159 .BI Build\-Conflicts\-Arch: " package list"
160 Same as \fBBuild\-Conflicts\fP, but only when building the architecture
161 dependent packages. This field was introduced in dpkg version 1.16.4; in
162 order to build with older dpkg versions, \fBBuild\-Conflicts\fP should
163 be used instead.
164
165 .TP
166 .BI Build\-Conflicts\-Indep: " package-list"
167 Same as \fBBuild\-Conflicts\fP, but only when building the architecture
168 independent packages.
169
170 .PP
171 The syntax of the
172 .BR Build\-Depends ,
173 .B Build\-Depends\-Arch
174 and
175 .B Build\-Depends\-Indep
176 fields is a list of groups of alternative packages. Each group is a list
177 of packages separated by vertical bar (or "pipe") symbols, "|". The
178 groups are separated by commas. Commas are to be read as "AND", and pipes
179 as "OR", with pipes binding more tightly. Each package name is
180 optionally followed by a version number specification in parentheses and an
181 architecture specification in square brackets.
182
183 The syntax of the
184 .BR Build\-Conflicts ,
185 .B Build\-Conflicts\-Arch
186 and
187 .B Build\-Conflicts\-Indep
188 fields is a list of comma-separated package names, where the comma is read
189 as an "AND". Specifying alternative packages using a "pipe" is not supported.
190 Each package name is optionally followed by a version number specification in
191 parentheses and an architecture specification in square brackets.
192
193 A version number may start with a ">>", in which case any later version
194 will match, and may specify or omit the Debian packaging revision (separated
195 by a hyphen). Accepted version relationships are ">>" for greater than,
196 "<<" for less than, ">=" for greater than or equal to, "<=" for less than
197 or equal to, and "=" for equal to.
198
199 A architecture specification consists of one or more architecture names,
200 separated by whitespace. Exclamation marks may be prepended to each of the
201 names, meaning "NOT".
202
203 Note that dependencies on packages in the
204 .B build\-essential
205 set can be omitted and that declaring build conflicts against them is
206 impossible. A list of these packages is in the build\-essential package.
207
208
209 .SH BINARY FIELDS
210
211 .LP
212 Note that the
213 .BR Priority ", " Section
214 and
215 .B Homepage
216 fields can also be in a binary paragraph to override the global value from the
217 source package.
218
219 .TP
220 .BR Package: " \fIbinary-package-name\fP (required)"
221 This field is used to name the binary package name. The same restrictions as
222 to a source package name apply.
223
224 .TP
225 .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
226 The architecture specifies on which type of hardware this package runs. For
227 packages that run on all architectures, use the
228 .B any
229 value. For packages that are architecture independent, such as shell and Perl
230 scripts or documentation, use the
231 .B all
232 value. To restrict the packages to a certain set of architectures, specify the
233 architecture names, separated by a space. It's also possible to put
234 architecture wildcards in that list (see
235 .BR dpkg\-architecture (1)
236 for more information about them).
237
238 .TP
239 .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
240 This field defines the type of the package. "udeb" is for size-constrained
241 packages used by the debian installer. "deb" is the default value, it's
242 assumed if the field is absent. More types might be added in the future.
243
244 .TP
245 .PD 0
246 .BI Subarchitecture: " value"
247 .TP
248 .PD 0
249 .BI Kernel\-Version: " value"
250 .TP
251 .PD 0
252 .BI Installer\-Menu\-Item: " value"
253 These fields are used by the debian\-installer and are usually not needed.
254 See /usr/share/doc/debian\-installer/devel/modules.txt from the
255 .B debian\-installer
256 package for more details about them.
257
258 .TP
259 .PD 0
260 .BR Essential: " \fByes\fP|\fBno\fP"
261 .TP
262 .PD 0
263 .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP"
264 .TP
265 .PD 0
266 .BI Tag: " tag-list"
267 .TP
268 .PD 0
269 .BR Description: " \fIshort-description\fP (required)"
270 These fields are described in the
271 .BR deb\-control (5)
272 manual page, as they are copied literally to the control file of the binary
273 package.
274
275 .TP
276 .PD 0
277 .BI Depends: " package-list"
278 .TP
279 .PD 0
280 .BI Pre\-Depends: " package-list"
281 .TP
282 .PD 0
283 .BI Recommends: " package-list"
284 .TP
285 .PD 0
286 .BI Suggests: " package-list"
287 .TP
288 .PD 0
289 .BI Breaks: " package-list"
290 .TP
291 .PD 0
292 .BI Enhances: " package-list"
293 .TP
294 .PD 0
295 .BI Replaces: " package-list"
296 .TP
297 .PD 0
298 .BI Conflicts: " package-list"
299 .TP
300 .PD 0
301 .BI Provides: " package-list"
302 .TP
303 .PD 0
304 .BI Built\-Using: " package-list"
305 .br
306 These fields declare relationships between packages. They are discussed in
307 the
308 .BR deb\-control (5)
309 manpage and in the
310 .B debian\-policy
311 package.
312
313 .SH USER-DEFINED FIELDS
314 It is allowed to add additional user-defined fields to the control file. The
315 tools will ignore these fields. If you want the fields to be copied over to
316 the output files, such as the binary packages, you need to use a custom naming
317 scheme: the fields should start with a X, followed by one or more of the
318 letters BCS and a hypen. If the letter B is used, the field will appear in the
319 control file in the binary package, see
320 .BR deb\-control (5),
321 for the letter S in the source package control file as constructed by
322 .BR dpkg\-source (1)
323 and for the letter C in the upload control (.changes) file. Note that the
324 X[BCS]\- prefixes are stripped when the fields are copied over to the
325 output files. A field \fBXC\-Approved\-By\fP will appear as
326 \fBApproved\-By\fP in the changes file and will not appear in the binary or
327 source package control files.
328
329 Take into account that these user-defined fields will be using the global
330 namespace, which might at some point in the future collide with officially
331 recognized fields. To avoid such potential situation you can prefix those
332 fields with \fBPrivate\-\fP, such as \fBXB\-Private\-New\-Field\fP, which as
333 a side effect will make \fBdpkg\-deb\fP not warn on them as unknown fields.
334
335 .SH EXAMPLE
336 .\" .RS
337 .nf
338 # Comment
339 Source: dpkg
340 Section: admin
341 Priority: required
342 Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
343 # this field is copied to the binary and source packages
344 XBS\-Upstream\-Release\-Status: stable
345 Homepage: http://wiki.debian.org/Teams/Dpkg
346 Vcs\-Browser: http://git.debian.org/?p=dpkg/dpkg.git
347 Vcs\-Git: git://git.debian.org/git/dpkg/dpkg.git
348 Standards\-Version: 3.7.3
349 Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
350  libselinux1\-dev (>= 1.28\-4) [!linux\-any]
351
352 Package: dpkg\-dev
353 Section: utils
354 Priority: optional
355 Architecture: all
356 # this is a custom field in the binary package
357 XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
358 Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
359  bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
360 Recommends: gcc | c\-compiler, build\-essential
361 Suggests: gnupg, debian\-keyring
362 Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
363 Replaces: manpages\-pl (<= 20051117\-1)
364 Description: Debian package development tools
365  This package provides the development tools (including dpkg\-source)
366  required to unpack, build and upload Debian source packages.
367  .
368  Most Debian source packages will require additional tools to build;
369  for example, most packages need make and the C compiler gcc.
370 .fi
371 .\" .RE
372
373
374 .SH SEE ALSO
375 .BR deb\-control (5),
376 .BR deb\-version (5),
377 .BR dpkg\-source (1)