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