deb-src-control.5 11 KB

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