deb-substvars.5 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. .\" Authors: Ian Jackson
  2. .TH deb\-substvars 5 "2007-07-18" "Debian Project" "dpkg utilities"
  3. .SH NAME
  4. deb\-substvars \- Debian source substitution variables
  5. .
  6. .SH SYNOPSIS
  7. substvars
  8. .
  9. .SH DESCRIPTION
  10. Before
  11. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges
  12. write their control information (to the source control file
  13. .B .dsc
  14. for
  15. .B dpkg\-source
  16. and to standard output for
  17. .BR dpkg\-gencontrol " and " dpkg\-genchanges )
  18. they perform some variable substitutions on the output file.
  19. A variable substitution has the form
  20. .BI ${ variable-name }\fR.
  21. Variable names consist of alphanumerics, hyphens and colons and start
  22. with an alphanumeric. Variable substitutions are performed repeatedly
  23. until none are left; the full text of the field after the substitution
  24. is rescanned to look for more substitutions.
  25. After all the substitutions have been done each occurrence of the
  26. string
  27. .B ${}
  28. (which is not a legal substitution) is replaced with a
  29. .B $
  30. sign.
  31. Variables can be set using the
  32. .B \-V
  33. common option. They can be also specified in the file
  34. .B debian/substvars
  35. (or whatever other file is specified using the
  36. .B \-T
  37. option). This file consists of lines of the form
  38. .IB name = value\fR.
  39. Trailing whitespace on each line, blank lines, and
  40. lines starting with a
  41. .B #
  42. symbol (comments) are ignored.
  43. Additionally, the following standard variables are available:
  44. .TP
  45. .BI Arch
  46. The current build architecture (from
  47. .BR "dpkg \-\-print\-architecture" ).
  48. .TP
  49. .B source:Version
  50. The source package version.
  51. .TP
  52. .B source:Upstream\-Version
  53. The upstream source package version, including the Debian version epoch if
  54. any.
  55. .TP
  56. .B binary:Version
  57. The binary package version (which may differ from source:Version in a binNMU
  58. for example).
  59. .TP
  60. .B Source\-Version
  61. The source package version (from the changelog file). This variable is now
  62. \fBdeprecated\fP as its meaning is different from its function, please use
  63. the \fBsource:Version\fP or \fBbinary:Version\fP as appropriate.
  64. .TP
  65. .B Installed\-Size
  66. The total size of the package's installed files. This value is copied
  67. into the corresponding control file field; setting it will modify the
  68. value of that field. If this variable isn't set
  69. .B dpkg\-gencontrol
  70. will use
  71. .B du \-k debian/tmp
  72. to find the default value.
  73. .TP
  74. .B Extra\-Size
  75. Additional disk space used when the package is installed. If this
  76. variable is set its value is added to that of the
  77. .B Installed\-Size
  78. variable (whether set explicitly or using the default value) before it
  79. is copied into the
  80. .B Installed\-Size
  81. control file field.
  82. .TP
  83. .BI F: fieldname
  84. The value of the output field
  85. .IR fieldname
  86. (which must be given in the canonical capitalisation). Setting these
  87. variables has no effect other than on places where they are expanded
  88. explicitly.
  89. .TP
  90. .B Format
  91. The
  92. .B .changes
  93. file format version generated by this version of the source packaging
  94. scripts. If you set this variable the contents of the
  95. .B Format
  96. field in the
  97. .B .changes
  98. file will change too.
  99. .TP
  100. .BR Newline ", " Space ", " Tab
  101. These variables each hold the corresponding character.
  102. .TP
  103. .BI shlibs: dependencyfield
  104. Variable settings with names of this form are generated by
  105. .BR dpkg\-shlibdeps .
  106. .TP
  107. .B dpkg:Upstream\-Version
  108. The upstream version of dpkg.
  109. .TP
  110. .B dpkg:Version
  111. The full version of dpkg.
  112. .LP
  113. If a variable is referred to but not defined it generates a warning
  114. and an empty value is assumed.
  115. .
  116. .SH FILES
  117. .TP
  118. .B debian/substvars
  119. List of substitution variables and values.
  120. .
  121. .SH BUGS
  122. The point at which field overriding occurs compared to certain
  123. standard output field settings is rather confused.
  124. .SH SEE ALSO
  125. .BR dpkg (1),
  126. .BR dpkg\-genchanges (1),
  127. .BR dpkg\-gencontrol (1),
  128. .BR dpkg\-shlibdeps (1),
  129. .BR dpkg\-source (1).
  130. .
  131. .SH AUTHOR
  132. Copyright (C) 1995-1996 Ian Jackson
  133. .br
  134. Copyright (C) 2000 Wichert Akkerman
  135. .sp
  136. This is free software; see the GNU General Public Licence version 2 or
  137. later for copying conditions. There is NO WARRANTY.