deb-src-control.5 13 KB

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