1deb-substvars(5)                  dpkg suite                  deb-substvars(5)
2
3
4

NAME

6       deb-substvars - Debian source substitution variables
7

SYNOPSIS

9       substvars
10

DESCRIPTION

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
19       alphanumeric. Variable substitutions  are  performed  repeatedly  until
20       none  are  left;  the  full text of the field after the substitution is
21       rescanned to 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       Variable  substitution  happens on the content of the fields after they
33       have been parsed, thus if you want a variable to expand  over  multiple
34       lines  you  do  not  have to include a space after the newline. This is
35       done implicitly when the field is output. For example, if the  variable
36       ${Description}  is  set  to "foo is bar.${Newline}foo is great." and if
37       you have the following field:
38
39        Description: foo application
40         ${Description}
41         .
42         More text.
43
44       It will result in:
45
46        Description: foo application
47         foo is bar.
48         foo is great.
49         .
50         More text.
51
52       Variables can be set using the -V  common  option.  They  can  be  also
53       specified  in  the  file  debian/substvars  (or  whatever other file is
54       specified using the -T option). This file consists of lines of the form
55       name=value.   Trailing  whitespace on each line, blank lines, and lines
56       starting with a # symbol (comments) are ignored.
57
58       Additionally, the following standard variables are available:
59
60       Arch   The current host architecture (i.e. the architecture the package
61              is being built for, the equivalent of DEB_HOST_ARCH).
62
63       source:Version
64              The source package version (since dpkg 1.13.19).
65
66       source:Upstream-Version
67              The  upstream  source  package  version,  including  the  Debian
68              version epoch if any (since dpkg 1.13.19).
69
70       binary:Version
71              The binary package version (which may differ from source:Version
72              in a binNMU for example; since dpkg 1.13.19).
73
74       Source-Version
75              The  source  package  version  (from  the  changelog file). This
76              variable is now obsolete and emits an error  when  used  as  its
77              meaning   is   different  from  its  function,  please  use  the
78              source:Version or binary:Version as appropriate.
79
80       Installed-Size
81              The approximate total size of  the  package's  installed  files.
82              This  value is copied into the corresponding control file field;
83              setting it will modify the value of that field. If this variable
84              is  not  set  dpkg-gencontrol  will compute the default value by
85              accumulating the size of each regular file and  symlink  rounded
86              to  1  KiB  used  units,  and  a baseline of 1 KiB for any other
87              filesystem object type.
88
89              Note:  Take  into  account  that  this  can  only  ever  be   an
90              approximation,  as  the actual size used on the installed system
91              will depend greatly on the filesystem used and  its  parameters,
92              which  might  end  up  using  either more or less space than the
93              specified in this field.
94
95       Extra-Size
96              Additional disk space used when the  package  is  installed.  If
97              this  variable  is  set  its  value  is  added  to  that  of the
98              Installed-Size variable (whether set  explicitly  or  using  the
99              default  value)  before  it  is  copied  into the Installed-Size
100              control file field.
101
102       S:fieldname
103              The value of the source stanza field fieldname  (which  must  be
104              given  in  the  canonical  capitalisation;  since dpkg 1.18.11).
105              Setting these variables has no effect other than on places where
106              they   are   expanded  explicitly.   These  variables  are  only
107              available when generating binary control files.
108
109       F:fieldname
110              The value of the output field fieldname (which must be given  in
111              the  canonical  capitalisation).  Setting these variables has no
112              effect other than on places where they are expanded explicitly.
113
114       Format The .changes file format version generated by  this  version  of
115              the  source  packaging  scripts.  If  you  set this variable the
116              contents of the Format field in the .changes  file  will  change
117              too.
118
119       Newline, Space, Tab
120              These variables each hold the corresponding character.
121
122       shlibs:dependencyfield
123              Variable  settings  with  names  of  this  form are generated by
124              dpkg-shlibdeps.
125
126       dpkg:Upstream-Version
127              The upstream version of dpkg (since dpkg 1.13.19).
128
129       dpkg:Version
130              The full version of dpkg (since dpkg 1.13.19).
131
132       If a variable is referred to but not defined it generates a warning and
133       an empty value is assumed.
134

FILES

136       debian/substvars
137              List of substitution variables and values.
138

SEE ALSO

140       dpkg(1), dpkg-genchanges(1), dpkg-gencontrol(1), dpkg-shlibdeps(1),
141       dpkg-source(1).
142
143
144
1451.18.25                           2018-06-26                  deb-substvars(5)
Impressum