deb-src-control.5 12 KB

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