deb-src-control.5 11 KB

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