dpkg-source.1 23 KB

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