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

FILES

147       debian/substvars
148              List of substitution variables and values.
149

SEE ALSO

151       dpkg(1), dpkg-genchanges(1), dpkg-gencontrol(1), dpkg-shlibdeps(1),
152       dpkg-source(1).
153
154
155
1561.19.7                            2019-06-03                  deb-substvars(5)
Impressum