dpkg-source.1 25 KB

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