deb-src-control.5 11 KB

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