dpkg-source.1 23 KB

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