1 .\" Authors: Ian Jackson
2 .TH deb\-substvars 5 "2009-07-15" "Debian Project" "dpkg utilities"
4 deb\-substvars \- Debian source substitution variables
11 .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges
12 write their control information (to the source control file
16 and to standard output for
17 .BR dpkg\-gencontrol " and " dpkg\-genchanges )
18 they perform some variable substitutions on the output file.
20 A variable substitution has the form
21 .BI ${ variable-name }\fR.
22 Variable names consist of alphanumerics, hyphens and colons and start
23 with an alphanumeric. Variable substitutions are performed repeatedly
24 until none are left; the full text of the field after the substitution
25 is rescanned to look for more substitutions.
27 After all the substitutions have been done each occurrence of the
30 (which is not a legal substitution) is replaced with a
34 While variable substitution is done on all control fields, some of those
35 fields are used and needed during the build when the substitution did not
36 yet occur. That's why you can't use variables in the \fBPackage\fP,
37 \fBSource\fP and \fBArchitecture\fP fields.
39 Variable substitution happens on the content of the fields after they have
40 been parsed, thus if you want a variable to expand over multiple lines you
41 do not have to include a space after the newline. This is done implicitly
42 when the field is output. For example, if the variable
43 \fB${Description}\fP is set to "foo is bar.${Newline}foo is
44 great." and if you have the following field:
46 Description: foo application
53 Description: foo application
59 Variables can be set using the
61 common option. They can be also specified in the file
63 (or whatever other file is specified using the
65 option). This file consists of lines of the form
67 Trailing whitespace on each line, blank lines, and
70 symbol (comments) are ignored.
72 Additionally, the following standard variables are available:
75 The current build architecture (from
76 .BR "dpkg \-\-print\-architecture" ).
79 The source package version.
81 .B source:Upstream\-Version
82 The upstream source package version, including the Debian version epoch if
86 The binary package version (which may differ from source:Version in a binNMU
90 The source package version (from the changelog file). This variable is now
91 \fBdeprecated\fP as its meaning is different from its function, please use
92 the \fBsource:Version\fP or \fBbinary:Version\fP as appropriate.
95 The total size of the package's installed files. This value is copied
96 into the corresponding control file field; setting it will modify the
97 value of that field. If this variable isn't set
101 to find the default value.
104 Additional disk space used when the package is installed. If this
105 variable is set its value is added to that of the
107 variable (whether set explicitly or using the default value) before it
113 The value of the output field
115 (which must be given in the canonical capitalisation). Setting these
116 variables has no effect other than on places where they are expanded
122 file format version generated by this version of the source packaging
123 scripts. If you set this variable the contents of the
127 file will change too.
129 .BR Newline ", " Space ", " Tab
130 These variables each hold the corresponding character.
132 .BI shlibs: dependencyfield
133 Variable settings with names of this form are generated by
134 .BR dpkg\-shlibdeps .
136 .B dpkg:Upstream\-Version
137 The upstream version of dpkg.
140 The full version of dpkg.
142 If a variable is referred to but not defined it generates a warning
143 and an empty value is assumed.
148 List of substitution variables and values.
151 The point at which field overriding occurs compared to certain
152 standard output field settings is rather confused.
156 .BR dpkg\-genchanges (1),
157 .BR dpkg\-gencontrol (1),
158 .BR dpkg\-shlibdeps (1),
159 .BR dpkg\-source (1).
162 Copyright \(co 1995-1996 Ian Jackson
164 Copyright \(co 2000 Wichert Akkerman
166 This is free software; see the GNU General Public Licence version 2 or
167 later for copying conditions. There is NO WARRANTY.