deb-src-control.5 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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 "2011-08-14" "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 to build
  116. the source package.
  117. .TP
  118. .BI Build\-Depends\-Indep: " package-list"
  119. Same as \fBBuild\-Depends\fP, but they are only needed when building the
  120. architecture independent packages. The \fBBuild\-Depends\fP are also installed
  121. in this case.
  122. .TP
  123. .BI Build\-Conflicts: " package-list"
  124. A list of packages that should not be installed when the package is build, for
  125. example because they interfere with the used build system.
  126. .TP
  127. .BI Build\-Conflicts\-Indep: " package-list"
  128. Same as \fBBuild\-Conflicts\fP, but only when building the architecture
  129. independent packages.
  130. The syntax of the
  131. .B Build\-Depends
  132. and
  133. .B Build\-Depends\-Indep
  134. fields is a list of groups of alternative packages. Each group is a list
  135. of packages separated by vertical bar (or "pipe") symbols, "|". The
  136. groups are separated by commas. Commas are to be read as "AND", and pipes
  137. as "OR", with pipes binding more tightly. Each package name is
  138. optionally followed by a version number specification in parentheses and an
  139. architecture specification in square brackets.
  140. The syntax of the
  141. .B Build\-Conflicts
  142. and
  143. .B Build\-Conflicts\-Indep
  144. fields is a list of comma-separated package names, where the comma is read
  145. as an "AND". Specifying alternative packages using a "pipe" is not supported.
  146. Each package name is optionally followed by a version number specification in
  147. parentheses and an architecture specification in square brackets.
  148. A version number may start with a ">>", in which case any later version
  149. will match, and may specify or omit the Debian packaging revision (separated
  150. by a hyphen). Accepted version relationships are ">>" for greater than,
  151. "<<" for less than, ">=" for greater than or equal to, "<=" for less than
  152. or equal to, and "=" for equal to.
  153. A architecture specification consists of one or more architecture names,
  154. separated by whitespace. Exclamation marks may be prepended to each of the
  155. names, meaning "NOT".
  156. Note that dependencies on packages in the
  157. .B build\-essential
  158. set can be omitted and that declaring build conflicts against them is
  159. impossible. A list of these packages is in the build\-essential package.
  160. .SH BINARY FIELDS
  161. .LP
  162. Note that the
  163. .BR Priority ", " Section
  164. and
  165. .B Homepage
  166. fields can also be in a binary paragraph to override the global value from the
  167. source package.
  168. .TP
  169. .BR Package: " \fIbinary-package-name\fP (required)"
  170. This field is used to name the binary package name. The same restrictions as
  171. to a source package name apply.
  172. .TP
  173. .BR Architecture: " \fIarch\fP|\fBall\fP|\fBany\fP (required)"
  174. The architecture specifies on which type of hardware this package runs. For
  175. packages that run on all architectures, use the
  176. .B any
  177. value. For packages that are architecture independent, such as shell and Perl
  178. scripts or documentation, use the
  179. .B all
  180. value. To restrict the packages to a certain set of architectures, specify the
  181. architecture names, separated by a space. It's also possible to put
  182. architecture wildcards in that list (see
  183. .BR dpkg\-architecture (1)
  184. for more information about them).
  185. .TP
  186. .BR Package\-Type: " \fBdeb\fP|\fBudeb\fP"
  187. This field defines the type of the package. "udeb" is for size-constrained
  188. packages used by the debian installer. "deb" is the default value, it's
  189. assumed if the field is absent. More types might be added in the future.
  190. .TP
  191. .PD 0
  192. .BI Subarchitecture: " value"
  193. .TP
  194. .PD 0
  195. .BI Kernel\-Version: " value"
  196. .TP
  197. .PD 0
  198. .BI Installer\-Menu\-Item: " value"
  199. These fields are used by the debian\-installer and are usually not needed.
  200. See /usr/share/doc/debian\-installer/devel/modules.txt from the
  201. .B debian\-installer
  202. package for more details about them.
  203. .TP
  204. .PD 0
  205. .BR Essential: " \fByes\fP|\fBno\fP"
  206. .TP
  207. .PD 0
  208. .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP"
  209. .TP
  210. .PD 0
  211. .BI Tag: " tag-list"
  212. .TP
  213. .PD 0
  214. .BR Description: " \fIshort-description\fP (required)"
  215. These fields are described in the
  216. .BR deb\-control (5)
  217. manual page, as they are copied literally to the control file of the binary
  218. package.
  219. .TP
  220. .PD 0
  221. .BI Depends: " package-list"
  222. .TP
  223. .PD 0
  224. .BI Pre\-Depends: " package-list"
  225. .TP
  226. .PD 0
  227. .BI Recommends: " package-list"
  228. .TP
  229. .PD 0
  230. .BI Suggests: " package-list"
  231. .TP
  232. .PD 0
  233. .BI Breaks: " package-list"
  234. .TP
  235. .PD 0
  236. .BI Enhances: " package-list"
  237. .TP
  238. .PD 0
  239. .BI Replaces: " package-list"
  240. .TP
  241. .PD 0
  242. .BI Conflicts: " package-list"
  243. .TP
  244. .PD 0
  245. .BI Provides: " package-list"
  246. .TP
  247. .PD 0
  248. .BI Built\-Using: " package-list"
  249. .br
  250. These fields declare relationships between packages. They are discussed in
  251. the
  252. .BR deb\-control (5)
  253. manpage and in the
  254. .B debian\-policy
  255. package.
  256. .SH USER-DEFINED FIELDS
  257. It is allowed to add additional user-defined fields to the control file. The
  258. tools will ignore these fields. If you want the fields to be copied over to
  259. the output files, such as the binary packages, you need to use a custom naming
  260. scheme: the fields should start with a X, followed by one or more of the
  261. letters BCS and a hypen. If the letter B is used, the field will appear in the
  262. control file in the binary package, see
  263. .BR deb\-control (5),
  264. for the letter S in the source package control file as constructed by
  265. .BR dpkg\-source (1)
  266. and for the letter C in the upload control (.changes) file. Note that the
  267. X[BCS]\- prefixes are stripped when the fields are copied over to the
  268. output files. A field \fBXC\-Approved\-By\fP will appear as
  269. \fBApproved\-By\fP in the changes file and will not appear in the binary or
  270. source package control files.
  271. .SH EXAMPLE
  272. .\" .RS
  273. .nf
  274. # Comment
  275. Source: dpkg
  276. Section: admin
  277. Priority: required
  278. Maintainer: Dpkg Developers <debian\-dpkg@lists.debian.org>
  279. # this field is copied to the binary and source packages
  280. XBS\-Upstream\-Release\-Status: stable
  281. Homepage: http://wiki.debian.org/Teams/Dpkg
  282. Vcs\-Browser: http://git.debian.org/?p=dpkg/dpkg.git
  283. Vcs\-Git: git://git.debian.org/git/dpkg/dpkg.git
  284. Standards\-Version: 3.7.3
  285. Build\-Depends: pkg\-config, debhelper (>= 4.1.81),
  286. libselinux1\-dev (>= 1.28\-4) [!linux\-any]
  287. Package: dpkg\-dev
  288. Section: utils
  289. Priority: optional
  290. Architecture: all
  291. # this is a custom field in the binary package
  292. XB\-Mentoring\-Contact: Raphael Hertzog <hertzog@debian.org>
  293. Depends: dpkg (>= 1.14.6), perl5, perl\-modules, cpio (>= 2.4.2\-2),
  294. bzip2, lzma, patch (>= 2.2\-1), make, binutils, libtimedate\-perl
  295. Recommends: gcc | c\-compiler, build\-essential
  296. Suggests: gnupg, debian\-keyring
  297. Conflicts: dpkg\-cross (<< 2.0.0), devscripts (<< 2.10.26)
  298. Replaces: manpages\-pl (<= 20051117\-1)
  299. Description: Debian package development tools
  300. This package provides the development tools (including dpkg\-source)
  301. required to unpack, build and upload Debian source packages.
  302. .
  303. Most Debian source packages will require additional tools to build;
  304. for example, most packages need make and the C compiler gcc.
  305. .fi
  306. .\" .RE
  307. .SH SEE ALSO
  308. .BR deb\-control (5),
  309. .BR deb\-version (5),
  310. .BR dpkg\-source (1)