dpkg-source.1 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. .\" Authors: Ian Jackson
  2. .TH dpkg\-source 1 "2006-05-23" "Debian Project" "dpkg utilities"
  3. .SH NAME
  4. dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges,
  5. dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
  6. \- Debian source package tools
  7. .
  8. .SH SYNOPSIS
  9. .B dpkg\-source
  10. .BI "\-x " filename .dsc
  11. .RI [ output-directory ]
  12. .br
  13. .B dpkg\-source \-b
  14. .RI [ options "] " directory " [" orig-directory | orig-targz |'']
  15. .br
  16. .B dpkg\-gencontrol
  17. .RI [ options ]
  18. .br
  19. .B dpkg\-shlibdeps
  20. .IR options
  21. .br
  22. .B dpkg\-genchanges
  23. .RI [ options ]
  24. .br
  25. .B dpkg\-buildpackage
  26. .RI [ options ]
  27. .br
  28. .B dpkg\-distaddfile
  29. .RI [ options ] " filename section priority"
  30. .br
  31. .B dpkg\-parsechangelog
  32. .RI [ options ]
  33. .SH DESCRIPTION
  34. .B dpkg\-source
  35. packs and unpacks Debian source archives.
  36. .B dpkg\-gencontrol
  37. reads information from an unpacked Debian source tree and generates a
  38. binary package control file (which defaults to debian/tmp/DEBIAN/control);
  39. it also adds an entry for the binary package to
  40. .BR debian/files .
  41. .B dpkg\-shlibdeps
  42. calculates shared library dependencies for executables named in its
  43. arguments. The dependencies are added to the substitution
  44. variables file
  45. .B debian/substvars
  46. as variable names
  47. .BI shlibs: dependencyfield
  48. where
  49. .I dependencyfield
  50. is a dependency field name. Any other variables starting
  51. .I shlibs:
  52. are removed from the file.
  53. .B dpkg\-shlibdeps
  54. will read shared library dependency information from
  55. .BR debian/shlibs.local ,
  56. .BR /etc/dpkg/shlibs.override ,
  57. the
  58. .B shlibs
  59. control area file of the package containing the file which
  60. .B objdump
  61. reports as satisfying the library dependency, or
  62. .BR /etc/dpkg/shlibs.default .
  63. The first match will be used.
  64. The format for a shared library dependency information entry in these
  65. files is (see the Debian Policy Manual for details):
  66. .br
  67. <library name> <version/soname> <dependencies>
  68. .B dpkg\-genchanges
  69. reads information from an unpacked and built Debian source tree and
  70. from the files it has generated and generates a Debian upload control
  71. file
  72. .RB ( .changes " file)."
  73. .B dpkg\-buildpackage
  74. is a control script which can be used to help automate the building of
  75. a package.
  76. .B dpkg\-distaddfile
  77. adds an entry for a named file to
  78. .BR debian/files .
  79. .B dpkg\-parsechangelog
  80. reads and parses the changelog of an unpacked Debian source tree and
  81. outputs the information in it to standard output in a machine-readable
  82. form.
  83. None of these commands allow multiple options to be combined into one,
  84. and they do not allow the value for an option to be specified in a
  85. separate argument.
  86. .SH COMMON OPTIONS
  87. Many of these programs share options; these are described here,
  88. together with the programs that accept them.
  89. .TP
  90. .BR \-h , \-\-help
  91. Display the particular program's usage message, including a synopsis of
  92. the options it understands.
  93. This option is understood by all the source package tools.
  94. .TP
  95. .BR \-\-version
  96. Display the particular program's version, including copyright and license
  97. information.
  98. This option is understood by all the source package tools.
  99. .TP
  100. .BI \-v version
  101. In
  102. .BR dpkg\-buildpackage ", " dpkg\-genchanges " and " dpkg\-parsechangelog
  103. this causes changelog information from all versions strictly later
  104. than
  105. .I version
  106. to be used.
  107. In
  108. .BR dpkg\-gencontrol
  109. it sets the version number of the binary package which will be
  110. generated.
  111. .TP
  112. .BI \-C changesdescription
  113. Read the description of the changes from the file
  114. .I changesdescription
  115. rather than using the information from the source tree's changelog
  116. file. This is understood by
  117. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  118. .TP
  119. .BI \-m maintaineraddress
  120. Use
  121. .I maintaineraddress
  122. as the name and email address of the maintainer for this package,
  123. rather than using the information from the source tree's control file.
  124. This is understood by
  125. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  126. .TP
  127. .BI \-e maintaineraddress
  128. Use
  129. .I maintaineraddress
  130. as the name and email address of the maintainer for this upload,
  131. rather than using the information from the source tree's changelog.
  132. This is understood by
  133. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  134. .TP
  135. .BR \-si ", " \-sa ", " \-sd
  136. These options control whether the original source archive is included
  137. in the upload generated by
  138. .BR dpkg\-buildpackage " or " dpkg\-genchanges
  139. if any source is being generated (i.e.,
  140. .BR \-b " or " \-B
  141. haven't been used).
  142. By default, or if
  143. .B \-si
  144. is specified, the original source will be included if the version
  145. number ends in
  146. .BR \-0 " or " \-1 ,
  147. i.e. if the Debian revision part of the version number is
  148. .BR 0 " or " 1 .
  149. .B \-sa
  150. forces the inclusion of the original source;
  151. .B \-sd
  152. forces its exclusion and includes only the diff.
  153. .TP
  154. .BI \-V name = value
  155. Set an output substitution variable.
  156. This option is understood by
  157. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  158. See below for a discussion of output substitution.
  159. .TP
  160. .BI \-T substvarsfile
  161. Read (or, for
  162. .BR dpkg\-shlibdeps ,
  163. write) substitution variables in
  164. .IR substvarsfile ;
  165. the default is
  166. .BR debian/substvars .
  167. This option is understood by
  168. .BR dpkg\-source ", " dpkg\-gencontrol ", " dpkg\-shlibdeps " and " dpkg\-genchanges .
  169. .TP
  170. .BI \-D field = value
  171. Override or add an output control file field.
  172. This option is understood by
  173. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  174. .TP
  175. .BI \-U field
  176. Remove an output control file field.
  177. This option is understood by
  178. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  179. .TP
  180. .BR \-b | \-B | \-S
  181. For
  182. .BR dpkg\-genchanges " and " dpkg\-buildpackage
  183. .BR \-b " and " \-B
  184. specify that a binary-only build is taking place.
  185. .B \-b
  186. indicates that no source files are to be built and/or distributed, and
  187. .B \-B
  188. that no architecture-independent binary package files are to be
  189. distributed either.
  190. .B \-S
  191. specifies that only the source should be uploaded and no binary packages
  192. need to be made. The distinction between
  193. .BR \-b " and " \-B
  194. is only used by
  195. .BR dpkg\-buildpackage ;
  196. .B dpkg\-genchanges
  197. just produces a
  198. .B .changes
  199. file for whatever files were produced by the
  200. .B binary\-*
  201. target(s) of the package being built.
  202. .B \-b
  203. tells
  204. .B dpkg\-source
  205. to build a source package (rather than to extract one) - see below.
  206. .TP
  207. .BI \-c controlfile
  208. Specifies the main source control file to read information from. The
  209. default is
  210. .BR debian/control .
  211. This option is understood by
  212. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  213. .TP
  214. .BI \-l changelogfile
  215. Specifies the change log file to read information from. The
  216. default is
  217. .BR debian/changelog .
  218. This option is understood by
  219. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  220. .TP
  221. .BI \-f fileslistfile
  222. Read or write the list of files to be uploaded here, rather than using
  223. .BR debian/files .
  224. This option is understood by
  225. .BR dpkg\-gencontrol ", " dpkg\-genchanges " and " dpkg\-distaddfile .
  226. .TP
  227. .BI \-F changelogformat
  228. Specifies the format of the changelog. By default the format is read
  229. from a special line near the bottom of the changelog or failing that
  230. defaults to the debian standard format.
  231. This option is understood by
  232. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  233. .TP
  234. .BI \-W
  235. This option turns certain errors into warnings. Only dpkg\-source uses
  236. this, but
  237. .BR dpkg\-buildpackage
  238. recognizes it, and passes it thru to
  239. .BR dpkg\-source "."
  240. .TP
  241. .BI \-E
  242. This option negates a previously set
  243. .BR \-W "."
  244. It is currently only understood by
  245. .BR dpkg\-buildpackage " and " dpkg\-source "."
  246. .SH dpkg\-SOURCE OPTIONS
  247. When the common options
  248. .BR \-c " and " \-l
  249. are given with relative pathnames these are interpreted starting at
  250. the source tree's top level directory.
  251. .TP
  252. .B \-x
  253. Extract a source package. One non-option argument must be supplied,
  254. the name of the Debian source control file
  255. .RB ( .dsc ).
  256. An optional second non-option argument may be supplied to specify the
  257. directory to extract the source package to, this must not exist. If
  258. no output directory is specified, the source package is extracted into
  259. a directory named \fIsource\fR-\fIversion-\fR under the current working
  260. directory.
  261. No options are useful with
  262. .BR "dpkg\-source \-x" .
  263. .B dpkg\-source
  264. will read the names of the other file(s) making up the source package
  265. from the control file; they are assumed to be in the same directory as
  266. the
  267. .BR .dsc .
  268. The files in the extracted package will have their permissions and
  269. ownerships set to those which would have been expected if the files
  270. and directories had simply been created - directories and executable
  271. files will be 0777 and plain files will be 0666, both modified by the
  272. extractors' umask; if the parent directory is setgid then the
  273. extracted directories will be too, and all the files and directories
  274. will inherit its group ownership.
  275. .TP
  276. .B \-b
  277. Build: pack up a source tree. One or two non-option arguments should
  278. be supplied. The first is taken as the name of the directory
  279. containing the unpacked source tree. If a second argument is supplied
  280. it should be the name of the original source directory or tarfile or
  281. the empty string if the package is a Debian-specific one and so has no
  282. Debianisation diffs. If no second argument is supplied then
  283. .B dpkg\-source
  284. will look for the original source tarfile
  285. .IB package _ upstream-version .orig.tar.gz
  286. or the original source directory
  287. .IB directory .orig
  288. or the empty string (no original source, and so no diff) depending on
  289. the arguments.
  290. .TP
  291. .B \-i[<regexp>]
  292. You may specify a perl regular expression to match files you want
  293. filtered out of the list of files for the diff. (This list is
  294. generated by a find command.) \fB\-i\fR by itself enables the option,
  295. with a default that will filter out control files and directories of the
  296. most common revision control systems, backup and swap files and Libtool
  297. build output directories.
  298. This is very helpful in cutting out extraneous files that get included
  299. in the .diff.gz, (eg: "debian/BUGS_TODO/*" or "debian/RCS/*,v"). For
  300. instance, if you maintain a package that you track via remote CVS,
  301. where you don't have access permissions for committing the debian
  302. control files and making tags for \fIcvs\-buildpackage(1)\fR, it is
  303. necessary to perform an extra checkout/update into a directory you
  304. keep pristine, to generate the .orig.tar.gz from. That directory will
  305. have CVS/Entries files in it that will contain timestamps that differ
  306. from the ones in your working directory, thus causing them to be
  307. unnecessarily included in every .diff.gz, unless you use the \fB\-i\fR
  308. switch.
  309. .TP
  310. .B \-I<filename>
  311. If this option is specified, the filename will be passed to tar's \-\-exclude
  312. option when it is called to generate a .orig.tar.gz or .tar.gz file. For
  313. example, \-ICVS will make tar skip over CVS directories when generating
  314. a .tar.gz file. The option may be repeated multiple times to list multiple
  315. filenames to exclude.
  316. .TP
  317. .BR \-sa , \-sp , \-su , \-sk , \-sA , \-sP , \-sU , \-sK , \-ss " with " \-b
  318. If
  319. .BR \-sk " or " \-sp
  320. is specified
  321. .B dpkg\-source
  322. expects the original source as a tarfile, by default
  323. .IB package _ upstream-version .orig.tar.gz\fR.
  324. It will leave this original source in place as a tarfile, or copy it
  325. to the current directory if it isn't already there
  326. If
  327. .B \-sp
  328. is used rather than
  329. .B \-sk
  330. it will remove it again afterwards.
  331. If
  332. .BR \-su " or " \-sr
  333. is specified the original source is expected as a directory, by
  334. default
  335. .IB package - upstream-version .orig
  336. and
  337. .B dpkg\-source
  338. will create a new original source archive from it. If
  339. .B \-sr
  340. is used
  341. .B dpkg\-source will remove that directory after it has been used.
  342. If
  343. .B \-ss
  344. is specified
  345. .B dpkg\-source
  346. will expect that the original source is available both as a directory
  347. and as a tarfile. If will use the directory to create the diff, but
  348. the tarfile to create the
  349. .BR .dsc .
  350. This option must be used with care - if the directory and tarfile do
  351. not match a bad source archive will be generated.
  352. If
  353. .B \-sn
  354. is specified
  355. .B dpkg\-source
  356. will not look for any original source, and will not generate a diff.
  357. The second argument, if supplied, must be the empty string. This is
  358. used for Debian-specific packages which do not have a separate
  359. upstream source and therefore have no debianisation diffs.
  360. If
  361. .BR \-sa " or " \-sA
  362. is specified
  363. .B dpkg\-source
  364. will look for the original source archive as a tarfile or as a
  365. directory - the second argument, if any, may be either, or the empty
  366. string (this is equivalent to using
  367. .BR \-sn ).
  368. If a tarfile is found it will unpack it to create the diff and remove
  369. it afterwards (this is equivalent to
  370. .BR \-sp );
  371. if a directory is found it will pack it to create the original source
  372. and remove it afterwards (this is equivalent to
  373. .BR \-sr );
  374. if neither is found it will assume that the package has no
  375. debianisation diffs, only a straightforward source archive (this is
  376. equivalent to
  377. .BR \-sn ).
  378. If both are found then dpkg\-source will ignore the directory,
  379. overwriting it, if
  380. .B \-sA
  381. was specified (this is equivalent to
  382. .BR \-sP )
  383. or raise an error if
  384. .B \-sa
  385. was specified.
  386. .B \-sA
  387. is the default.
  388. .BR \-sa ", " \-sp ", " \-sk ", " \-su " and " \-sr
  389. will not overwrite existing tarfiles or directories. If this is
  390. desired then
  391. .BR \-sA ", " \-sP ", " \-sK ", " \-sU " and " \-sR
  392. should be used instead.
  393. .TP
  394. .BR \-sp , \-su , \-sn " with " \-x
  395. In all cases any existing original source tree will be removed.
  396. If
  397. .B \-sp
  398. is used when extracting then the original source (if any) will be left
  399. as a tarfile. If it is not already located in the current directory
  400. or if an existing but different file is there it will be copied there.
  401. This is the default.
  402. .B \-su
  403. unpacks the original source tree.
  404. .B \-sn
  405. ensures that the original source is neither copied to the current
  406. directory nor unpacked. Any original source tree that was in the
  407. current directory is still removed.
  408. .PP
  409. All the
  410. .B \-sX
  411. options are mutually exclusive. If you specify more than one only the
  412. last one will be used.
  413. .SH dpkg\-GENCONTROL OPTIONS
  414. .B dpkg\-gencontrol
  415. does not take any non-option arguments.
  416. .TP
  417. .BI \-p package
  418. Generate information for the binary package
  419. .IR package .
  420. If the source control file lists only one binary package then this
  421. option may be omitted; otherwise it is essential to select which
  422. binary package's information to generate.
  423. .TP
  424. .BI \-n filename
  425. Assume the filename of the package will be
  426. .I filename
  427. instead of the normal package_version_arch.deb filename.
  428. .TP
  429. .BR \-is ", " \-ip ", " \-isp
  430. These options are ignored for compatibility with older versions of
  431. dpkg-dev but are now deprecated. Previously they were used to tell
  432. dpkg-gencontrol to include the Section and Priority fields in the
  433. control file. This is now the default behaviour. If you want to
  434. get the old behaviour you can use the
  435. .B \-U
  436. option to delete the fields from the control file.
  437. .TP
  438. .BI \-P packagebuilddir
  439. Tells
  440. .B dpkg\-source
  441. that the package is being built in
  442. .I packagebuilddir
  443. instead of
  444. .BR debian/tmp .
  445. This value is used to find the default value of the
  446. .B Installed\-Size
  447. substitution variable and control file field (using
  448. .BR du ),
  449. and for the default location of the output file.
  450. .TP
  451. .B \-O
  452. Causes the control file to be printed to standard output, rather than
  453. to
  454. .B debian/tmp/DEBIAN/control
  455. (or
  456. .IB packagebuilddir /DEBIAN/control
  457. if
  458. .B \-P
  459. was used).
  460. .SH dpkg\-SHLIBDEPS OPTIONS
  461. .B dpkg\-shlibdeps
  462. interprets non-option arguments as executable names, just as if they'd
  463. been supplied as
  464. .BI \-e executable\fR.
  465. .TP
  466. .BI \-e executable
  467. Include dependencies appropriate for the shared libraries required by
  468. .IR executable .
  469. .TP
  470. .BI \-d dependencyfield
  471. Add dependencies to be added to the control file dependency field
  472. .IR dependencyfield .
  473. (The dependencies for this field are placed in the variable
  474. .BI shlibs: dependencyfield\fR.)
  475. The
  476. .BI \-d dependencyfield
  477. option takes effect for all executables after the option, until the
  478. next
  479. .BI \-d dependencyfield\fR.
  480. The default
  481. .I dependencyfield
  482. is
  483. .BR Depends .
  484. If the same dependency entry (or set of alternatives) appears in more
  485. than one of the recognised dependency field names
  486. .BR Pre\-Depends ", " Depends ", " Recommends ", " Enhances " or " Suggests
  487. then
  488. .B dpkg\-shlibdeps
  489. will automatically remove the dependency from all fields except the
  490. one representing the most important dependencies.
  491. .TP
  492. .BI \-p varnameprefix
  493. Causes substitution variables to start with
  494. .IB varnameprefix :
  495. instead of
  496. .BR shlibs: .
  497. Likewise, any existing substitution variables starting with
  498. .IB varnameprefix :
  499. (rather than
  500. .BR shlibs: )
  501. are removed from the the substitution variables file.
  502. .TP
  503. .BI \-L localshlibsfile
  504. Causes
  505. .B dpkg\-shlibdeps
  506. to read overriding shared library dependency information from
  507. .I localshlibsfile
  508. instead of
  509. .BR debian/shlibs.local .
  510. .TP
  511. .B \-O
  512. Causes the substitution variable settings to be printed to standard
  513. output, rather than being added to the substitution variables file
  514. .RB ( debian/substvars
  515. by default).
  516. .TP
  517. .BI \-t type
  518. Causes
  519. .B dpkg\-shlibdeps
  520. to prefer shared library dependency information tagged for the given
  521. package type. If no tagged information is available, falls back to untagged
  522. information. The default package type is "deb". Shared library dependency
  523. information is tagged for a given type by prefixing it with the name of the
  524. type, a colon, and whitespace.
  525. .SH dpkg\-GENCHANGES OPTIONS
  526. .B dpkg\-genchanges
  527. does not take any non-option arguments.
  528. .TP
  529. .BI \-u uploadfilesdir
  530. Look for the files to be uploaded in
  531. .I uploadfilesdir
  532. rather than
  533. .B ..
  534. .RB ( dpkg\-genchanges
  535. needs to find these files so that it can include their sizes and
  536. checksums in the
  537. .B .changes
  538. file).
  539. .TP
  540. .B \-q
  541. Usually
  542. .B dpkg\-genchanges
  543. will produce informative messages on standard error, for example about
  544. how many of the package's source files are being uploaded.
  545. .B \-q
  546. suppresses these messages.
  547. .SH dpkg\-BUILDPACKAGE OPTIONS
  548. .B dpkg\-buildpackage
  549. does not take any non-option arguments.
  550. .TP
  551. .BI \-k key-id
  552. Specify a key-ID to use when signing packages.
  553. .TP
  554. .BI \-r gain-root-command
  555. When
  556. .B dpkg\-buildpackage
  557. needs to execute part of the build process as root, it prefixes the
  558. command it executes with
  559. .I gain-root-command
  560. if one has been specified.
  561. .I gain-root-command
  562. should be the name of a program on the
  563. .B PATH
  564. and will get as arguments the name of the real command to run and the
  565. arguments it should take.
  566. .I gain-root-command
  567. should not contain spaces or any other shell metacharacters.
  568. .\" what happens, if it contains spaces? (hs)
  569. .I gain-root-command
  570. might typically be
  571. .BR fakeroot ", " sudo ", " super " or " really .
  572. .B su
  573. is not suitable, since it requires a
  574. .B \-c
  575. option to run a command and even then it can only invoke the user's
  576. shell with
  577. .B \-c
  578. instead of passing arguments individually to the command to be run.
  579. .TP
  580. .BI \-p sign-command
  581. When
  582. .B dpkg\-buildpackage
  583. needs to execute GPG or PGP to sign a source control
  584. .RB ( .dsc )
  585. file or a
  586. .B .changes
  587. file it will run
  588. .I sign-command
  589. (searching the
  590. .B PATH
  591. if necessary) instead of
  592. .BR pgp .
  593. .I sign-command
  594. will get all the arguments that
  595. .B pgp
  596. would have gotten. If
  597. .I sign-command
  598. takes its arguments in GPG rather than PGP style, you should give
  599. the
  600. .B \-sgpg
  601. option.
  602. .I sign-command
  603. should not contain spaces or any other shell metacharacters.
  604. .TP
  605. .B \-tc
  606. Clean the source tree (using
  607. .I gain-root-command
  608. .BR "debian/rules clean" )
  609. after the package has been built.
  610. .TP
  611. .BR \-us ", " \-uc
  612. Do not sign the source package or the .changes file, respectively.
  613. .TP
  614. .BI \-a architecture
  615. Specify the Debian architecture we build for. The architecture of the
  616. machine we build on is determined automatically, and is also the default
  617. for the host machine.
  618. .TP
  619. .B \-i[<regexp>]
  620. Passed unchanged to
  621. .BR dpkg\-source .
  622. .TP
  623. .B \-I<filename>
  624. Passed unchanged to
  625. .BR dpkg\-source .
  626. May be repeated multiple times.
  627. .TP
  628. .B \-D
  629. Check build dependencies and conflicts; abort if unsatisfied.
  630. .TP
  631. .B \-d
  632. Do not check build dependencies and conflicts.
  633. .TP
  634. .B \-nc
  635. Do not clean the source tree(implies \-b).
  636. .SH dpkg\-DISTADDFILE ARGUMENTS
  637. .B dpkg\-distaddfile
  638. does not take any non-common options. It takes three non-option
  639. arguments, the filename and the section and priority for the
  640. .B .changes
  641. file.
  642. The filename should be specified relative to the directory where
  643. .B dpkg\-genchanges
  644. will expect to find the files, usually
  645. .BR .. ,
  646. rather than being a pathname relative to the current directory when
  647. .B dpkg\-distaddfile
  648. is run.
  649. .SH dpkg\-PARSECHANGELOG ARGUMENTS
  650. .B dpkg\-parsechangelog
  651. does not take any non-common options or non-option arguments.
  652. .SH VARIABLE SUBSTITUTION
  653. Before
  654. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges
  655. write their control information (to the source control file
  656. .B .dsc
  657. for
  658. .B dpkg\-source
  659. and to standard output for
  660. .BR dpkg\-gencontrol " and " dpkg\-genchanges )
  661. they perform some variable substitutions on the output file.
  662. A variable substitution has the form
  663. .BI ${ variable-name }\fR.
  664. Variable names consist of alphanumerics, hyphens and colons and start
  665. with an alphanumeric. Variable substitutions are performed repeatedly
  666. until none are left; the full text of the field after the substitution
  667. is rescanned to look for more substitutions.
  668. After all the substitutions have been done each occurrence of the
  669. string
  670. .B ${}
  671. (which is not a legal substitution) is replaced with a
  672. .B $
  673. sign.
  674. Variables can be set using the
  675. .B \-V
  676. common option. They can be also specified in the file
  677. .B debian/substvars
  678. (or whatever other file is specified using the
  679. .B \-T
  680. option). This file consists of lines of the form
  681. .IB name = value\fR.
  682. Trailing whitespace on each line, blank lines, and
  683. lines starting with a
  684. .B #
  685. symbol (comments) are ignored.
  686. Additionally, the following standard variables are available:
  687. .TP
  688. .BI Arch
  689. The current build architecture (from
  690. .BR "dpkg \-\-print\-architecture" ).
  691. .TP
  692. .B source:Version
  693. The source package version.
  694. .TP
  695. .B source:Upstream\-Version
  696. The upstream source package version, including the Debian version epoch if
  697. any.
  698. .TP
  699. .B binary:Version
  700. The binary package version (which may differ from source:Version in a binNMU
  701. for example).
  702. .TP
  703. .B Source\-Version
  704. The source package version (from the changelog file). This variable is now
  705. \fBdeprecated\fP as its meaning is different from its function, please use
  706. the \fBsource:Version\fP or \fBbinary:Version\fP as appropriate.
  707. .TP
  708. .B Installed\-Size
  709. The total size of the package's installed files. This value is copied
  710. into the corresponding control file field; setting it will modify the
  711. value of that field. If this variable isn't set
  712. .B dpkg\-gencontrol
  713. will use
  714. .B du \-k debian/tmp
  715. to find the default value.
  716. .TP
  717. .B Extra\-Size
  718. Additional disk space used when the package is installed. If this
  719. variable is set its value is added to that of the
  720. .B Installed\-Size
  721. variable (whether set explicitly or using the default value) before it
  722. is copied into the
  723. .B Installed\-Size
  724. control file field.
  725. .TP
  726. .BI F: fieldname
  727. The value of the output field
  728. .IR fieldname
  729. (which must be given in the canonical capitalisation). Setting these
  730. variables has no effect other than on places where they are expanded
  731. explicitly.
  732. .TP
  733. .B Format
  734. The
  735. .B .changes
  736. file format version generated by this version of the source packaging
  737. scripts. If you set this variable the contents of the
  738. .B Format
  739. field in the
  740. .B .changes
  741. file will change too.
  742. .TP
  743. .BR Newline ", " Space ", " Tab
  744. These variables each hold the corresponding character.
  745. .TP
  746. .BI shlibs: dependencyfield
  747. Variable settings with names of this form are generated by
  748. .B dpkg\-shlibdeps
  749. - see above.
  750. .TP
  751. .B dpkg:Upstream\-Version
  752. The upstream version of dpkg.
  753. .TP
  754. .B dpkg:Version
  755. The full version of dpkg.
  756. .LP
  757. If a variable is referred to but not defined it generates a warning
  758. and an empty value is assumed.
  759. .SH FILES
  760. .TP
  761. .B debian/control
  762. The main source control information file, giving version-independent
  763. information about the source package and the binary packages it can
  764. produce.
  765. .TP
  766. .B debian/changelog
  767. The changelog file, used to obtain version-dependent information about
  768. the source package, such as the urgency and distribution of an upload,
  769. the changes made since a particular release, and the source version
  770. number itself.
  771. .TP
  772. .B debian/files
  773. The list of generated files which are part of the upload being
  774. prepared.
  775. .B dpkg\-gencontrol
  776. adds the presumed filenames of binary packages whose control files it
  777. generates here;
  778. .B dpkg\-distaddfile
  779. can be used to add additional files.
  780. .B dpkg\-genchanges
  781. reads the data here when producing a
  782. .B .changes
  783. file.
  784. .TP
  785. .B debian/substvars
  786. List of substitution variables and values.
  787. .TP
  788. .B debian/shlibs.local
  789. Package-local overriding shared library dependency information.
  790. .TP
  791. .B /etc/dpkg/shlibs.override
  792. Per-system overriding shared library dependency information.
  793. .TP
  794. .B /etc/dpkg/shlibs.default
  795. Per-system default shared library dependency information.
  796. .SH BUGS
  797. The point at which field overriding occurs compared to certain
  798. standard output field settings is rather confused.
  799. The binary package entries in the
  800. .B debian/files
  801. file will be passed through variable substitution twice. This should
  802. not matter, since
  803. .BR $ ", " { " and " }
  804. are not legal in package names or version numbers.
  805. It should be possible to specify spaces and shell metacharacters in
  806. and initial arguments for
  807. .IR gain-root-command " and " sign-command .
  808. .SH SEE ALSO
  809. .BR dpkg\-deb (1),
  810. .BR dpkg (1),
  811. .BR dselect (1),
  812. .BR gpg (1),
  813. .BR pgp (1).
  814. .SH AUTHOR
  815. The utilities and this manpage were written by Ian Jackson.
  816. .SH COPYRIGHT
  817. Copyright (C) 1995-1996 Ian Jackson
  818. .br
  819. Copyright (C) 2000 Wichert Akkerman
  820. .br
  821. This is free software; see the GNU General Public Licence version 2 or later
  822. for copying conditions. There is NO WARRANTY. See
  823. .B /usr/share/doc/dpkg/copyright
  824. and
  825. .B /usr/share/common\-licenses/GPL
  826. for details.