deb-src-control.5 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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. .TP
  55. .BR Maintainer: " \fIfullname-email\fP (required)"
  56. Should be in the format "Joe Bloggs <jbloggs@foo.com>", and references the
  57. person who currently maintains the package, as opposed to the author of the
  58. software or the original packager.
  59. .TP
  60. .BI Uploaders: " fullname-email"
  61. Lists all the names and email addresses of co-maintainers of the package, in
  62. the same format as the Maintainer field. Multiple co-maintainers should be
  63. separated by a comma.
  64. .TP
  65. .BI Standards\-Version: " version-string"
  66. This documents the most recent version of the standards (which consists of the
  67. Debian Policy Manual and referenced texts from the
  68. .B debian\-policy
  69. package) this package complies to.
  70. .TP
  71. .BR DM\-Upload\-Allowed: " \fByes\fP|\fBno\fP"
  72. This field indicates whether the package can be uploaded by Debian Maintainers
  73. appearing in the Maintainer or Uploaders field. The default value is "no".
  74. .TP
  75. .BI Homepage: " url"
  76. The upstream project home page URL.
  77. .TP
  78. .BI Bugs: " url"
  79. The \fIurl\fP of the bug tracking system for this package. The current
  80. used format is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
  81. \fBdebbugs://bugs.debian.org\fP. This field is usually not needed.
  82. .TP
  83. .BI Vcs\-*: " url"
  84. The \fIurl\fP of the Version Control System repository used to maintain this
  85. package. Currently supported are \fBArch\fP, \fBBzr\fP (Bazaar), \fBCvs\fP,
  86. \fBDarcs\fP, \fBGit\fP, \fBHg\fP (Mercurial), \fBMtn\fP (Monotone) and
  87. \fBSvn\fP (Subversion). Usually this field points to the latest version
  88. of the package, such as the main branch or the trunk.
  89. .TP
  90. .BI Vcs\-Browser: " url"
  91. The \fIurl\fP of a webinterface to browse the Version Control System
  92. repository.
  93. .TP
  94. .BI Origin: " name"
  95. The name of the distribution this package is originating from. This field is
  96. usually not needed.
  97. .TP
  98. .BI Section: " section"
  99. This is a general field that gives the package a category based on the
  100. software that it installs. Some common sections are "utils", "net",
  101. "mail", "text", "x11", etc.
  102. .TP
  103. .BI Priority: " priority"
  104. Sets the importance of this package in relation to the system as a whole.
  105. Common priorities are "required", "standard", "optional", "extra", etc.
  106. In Debian, the
  107. .B Section
  108. and
  109. .B Priority
  110. fields have a defined set of accepted values based on the Policy Manual.
  111. A list of these values can be obtained from the latest version of the
  112. .B debian\-policy
  113. package.
  114. .TP
  115. .BI Build\-Depends: " package-list"
  116. A list of packages that need to be installed and configured to be able
  117. to build the source package. Including a dependency in this list has
  118. the same effect as including it in both \fBBuild\-Depends\-Arch\fP and
  119. \fBBuild\-Depends\-Indep\fP, with the additional effect of being used
  120. for source-only builds.
  121. .TP
  122. .BI Build\-Depends\-Arch: " package list"
  123. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  124. architecture dependent packages. The \fBBuild\-Depends\fP are also
  125. installed in this case. This field was introduced in dpkg version
  126. 1.16.4; in order to build with older dpkg versions, \fBBuild\-Depends\fP
  127. should be used instead.
  128. .TP
  129. .BI Build\-Depends\-Indep: " package-list"
  130. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  131. architecture independent packages. The \fBBuild\-Depends\fP are also
  132. installed in this case.
  133. .TP
  134. .BI Build\-Conflicts: " package list"
  135. A list of packages that should not be installed when the package is
  136. built, for example because they interfere with the build system used.
  137. Including a dependency in this list has the same effect as including
  138. it in both \fBBuild\-Conflicts\-Arch\fP and
  139. \fBBuild\-Conflicts\-Indep\fP, with the additional effect of being
  140. used for source-only builds.
  141. .TP
  142. .BI Build\-Conflicts\-Arch: " package list"
  143. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  144. dependent packages. This field was introduced in dpkg version 1.16.4; in
  145. order to build with older dpkg versions, \fBBuild\-Conflicts\fP should
  146. be used instead.
  147. .TP
  148. .BI Build\-Conflicts\-Indep: " package-list"
  149. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  150. independent packages.
  151. .PP
  152. The syntax of the
  153. .BR Build\-Depends ,
  154. .B Build\-Depends\-Arch
  155. and
  156. .B Build\-Depends\-Indep
  157. fields is a list of groups of alternative packages. Each group is a list
  158. of packages separated by vertical bar (or "pipe") symbols, "|". The
  159. groups are separated by commas. Commas are to be read as "AND", and pipes
  160. as "OR", with pipes binding more tightly. Each package name is
  161. optionally followed by a version number specification in parentheses and an
  162. architecture specification in square brackets.
  163. The syntax of the
  164. .BR Build\-Conflicts ,
  165. .B Build\-Conflicts\-Arch
  166. and
  167. .B Build\-Conflicts\-Indep
  168. fields is a list of comma-separated package names, where the comma is read
  169. as an "AND". Specifying alternative packages using a "pipe" is not supported.
  170. Each package name is optionally followed by a version number specification in
  171. parentheses and an architecture specification in square brackets.
  172. A version number may start with a ">>", in which case any later version
  173. will match, and may specify or omit the Debian packaging revision (separated
  174. by a hyphen). Accepted version relationships are ">>" for greater than,
  175. "<<" for less than, ">=" for greater than or equal to, "<=" for less than
  176. or equal to, and "=" for equal to.
  177. A architecture specification consists of one or more architecture names,
  178. separated by whitespace. Exclamation marks may be prepended to each of the
  179. names, meaning "NOT".
  180. Note that dependencies on packages in the
  181. .B build\-essential
  182. set can be omitted and that declaring build conflicts against them is
  183. impossible. A list of these packages is in the build\-essential package.
  184. .SH BINARY FIELDS
  185. .LP
  186. Note that the
  187. .BR Priority ", " Section
  188. and
  189. .B Homepage
  190. fields can also be in a binary paragraph to override the global value from the
  191. source package.
  192. .TP
  193. .BR Package: " \fIbinary-package-name\fP (required)"
  194. This field is used to name the binary package name. The same restrictions as
  195. to a source package name apply.
  196. .TP
  197. .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
  198. The architecture specifies on which type of hardware this package runs. For
  199. packages that run on all architectures, use the
  200. .B any
  201. value. For packages that are architecture independent, such as shell and Perl
  202. scripts or documentation, use the
  203. .B all
  204. value. To restrict the packages to a certain set of architectures, specify the
  205. architecture names, separated by a space. It's also possible to put
  206. architecture wildcards in that list (see
  207. .BR dpkg\-architecture (1)
  208. for more information about them).
  209. .TP
  210. .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
  211. This field defines the type of the package. "udeb" is for size-constrained
  212. packages used by the debian installer. "deb" is the default value, it's
  213. assumed if the field is absent. More types might be added in the future.
  214. .TP
  215. .PD 0
  216. .BI Subarchitecture: " value"
  217. .TP
  218. .PD 0
  219. .BI Kernel\-Version: " value"
  220. .TP
  221. .PD 0
  222. .BI Installer\-Menu\-Item: " value"
  223. These fields are used by the debian\-installer and are usually not needed.
  224. See /usr/share/doc/debian\-installer/devel/modules.txt from the
  225. .B debian\-installer
  226. package for more details about them.
  227. .TP
  228. .PD 0
  229. .BR Essential: " \fByes\fP|\fBno\fP"
  230. .TP
  231. .PD 0
  232. .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP"
  233. .TP
  234. .PD 0
  235. .BI Tag: " tag-list"
  236. .TP
  237. .PD 0
  238. .BR Description: " \fIshort-description\fP (required)"
  239. These fields are described in the
  240. .BR deb\-control (5)
  241. manual page, as they are copied literally to the control file of the binary
  242. package.
  243. .TP
  244. .PD 0
  245. .BI Depends: " package-list"
  246. .TP
  247. .PD 0
  248. .BI Pre\-Depends: " package-list"
  249. .TP
  250. .PD 0
  251. .BI Recommends: " package-list"
  252. .TP
  253. .PD 0
  254. .BI Suggests: " package-list"
  255. .TP
  256. .PD 0
  257. .BI Breaks: " package-list"
  258. .TP
  259. .PD 0
  260. .BI Enhances: " package-list"
  261. .TP
  262. .PD 0
  263. .BI Replaces: " package-list"
  264. .TP
  265. .PD 0
  266. .BI Conflicts: " package-list"
  267. .TP
  268. .PD 0
  269. .BI Provides: " package-list"
  270. .TP
  271. .PD 0
  272. .BI Built\-Using: " package-list"
  273. .br
  274. These fields declare relationships between packages. They are discussed in
  275. the
  276. .BR deb\-control (5)
  277. manpage and in the
  278. .B debian\-policy
  279. package.
  280. .SH USER-DEFINED FIELDS
  281. It is allowed to add additional user-defined fields to the control file. The
  282. tools will ignore these fields. If you want the fields to be copied over to
  283. the output files, such as the binary packages, you need to use a custom naming
  284. scheme: the fields should start with a X, followed by one or more of the
  285. letters BCS and a hypen. If the letter B is used, the field will appear in the
  286. control file in the binary package, see
  287. .BR deb\-control (5),
  288. for the letter S in the source package control file as constructed by
  289. .BR dpkg\-source (1)
  290. and for the letter C in the upload control (.changes) file. Note that the
  291. X[BCS]\- prefixes are stripped when the fields are copied over to the
  292. output files. A field \fBXC\-Approved\-By\fP will appear as
  293. \fBApproved\-By\fP in the changes file and will not appear in the binary or
  294. source package control files.
  295. Take into account that these user-defined fields will be using the global
  296. namespace, which might at some point in the future collide with officially
  297. recognized fields. To avoid such potential situation you can prefix those
  298. fields with \fBPrivate\-\fP, such as \fBXB\-Private\-New\-Field\fP, which as
  299. a side effect will make \fBdpkg\-deb\fP not warn on them as unknown fields.
  300. .SH EXAMPLE
  301. .\" .RS
  302. .nf
  303. # Comment
  304. Source: dpkg
  305. Section: admin
  306. Priority: required
  307. Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
  308. # this field is copied to the binary and source packages
  309. XBS\-Upstream\-Release\-Status: stable
  310. Homepage: http://wiki.debian.org/Teams/Dpkg
  311. Vcs\-Browser: http://git.debian.org/?p=dpkg/dpkg.git
  312. Vcs\-Git: git://git.debian.org/git/dpkg/dpkg.git
  313. Standards\-Version: 3.7.3
  314. Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
  315. libselinux1\-dev (>= 1.28\-4) [!linux\-any]
  316. Package: dpkg\-dev
  317. Section: utils
  318. Priority: optional
  319. Architecture: all
  320. # this is a custom field in the binary package
  321. XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
  322. Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
  323. bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
  324. Recommends: gcc | c\-compiler, build\-essential
  325. Suggests: gnupg, debian\-keyring
  326. Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
  327. Replaces: manpages\-pl (<= 20051117\-1)
  328. Description: Debian package development tools
  329. This package provides the development tools (including dpkg\-source)
  330. required to unpack, build and upload Debian source packages.
  331. .
  332. Most Debian source packages will require additional tools to build;
  333. for example, most packages need make and the C compiler gcc.
  334. .fi
  335. .\" .RE
  336. .SH SEE ALSO
  337. .BR deb\-control (5),
  338. .BR deb\-version (5),
  339. .BR dpkg\-source (1)