.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "deb-substvars 5" .TH deb-substvars 5 "2022-09-01" "1.20.12" "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" deb\-substvars \- Debian source substitution variables .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdebian/substvars\fR, \fBdebian/\fR\fIbinary-package\fR\fB.substvars\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" Before \&\fBdpkg-source\fR, \fBdpkg-gencontrol\fR and \fBdpkg-genchanges\fR write their control information (to the source control file \&\fB.dsc\fR for \&\fBdpkg-source\fR and to standard output for \&\fBdpkg-gencontrol\fR and \fBdpkg-genchanges\fR) they perform some variable substitutions on the output file. .PP A variable substitution has the form \&\fB${\fR\fIvariable-name\fR\fB}\fR. Variable names consist of alphanumerics (a\-zA\-Z0\-9), hyphens (\-) and colons (:) and start with an alphanumeric, and are case-sensitive, even though they might refer to other entities which are case-preserving. Variable substitutions are performed repeatedly until none are left; the full text of the field after the substitution is rescanned to look for more substitutions. .PP After all the substitutions have been done each occurrence of the string \&\fB${}\fR (which is not a legal substitution) is replaced with a \&\fB$\fR sign. .PP While variable substitution is done on all control fields, some of those fields are used and needed during the build when the substitution did not yet occur. That's why you can't use variables in the \fBPackage\fR, \&\fBSource\fR and \fBArchitecture\fR fields. .PP Variable substitution happens on the content of the fields after they have been parsed, thus if you want a variable to expand over multiple lines you do not have to include a space after the newline. This is done implicitly when the field is output. For example, if the variable \&\fB${Description}\fR is set to \*(L"foo is bar.${Newline}foo is great.\*(R" and if you have the following field: .PP .Vb 4 \& Description: foo application \& ${Description} \& . \& More text. .Ve .PP It will result in: .PP .Vb 5 \& Description: foo application \& foo is bar. \& foo is great. \& . \& More text. .Ve .PP Variables can be set using the \&\fB\-V\fR common option. They can be also specified in the file \&\fBdebian/substvars\fR (or whatever other file is specified using the \&\fB\-T\fR option). This file consists of lines of the form \&\fIname\fR\fB=\fR\fIvalue\fR. Trailing whitespace on each line, blank lines, and lines starting with a \&\fB#\fR symbol (comments) are ignored. .PP Additionally, the following standard variables are available: .IP "\fBArch\fR" 4 .IX Item "Arch" The current host architecture (i.e. the architecture the package is being built for, the equivalent of \fB\s-1DEB_HOST_ARCH\s0\fR). .IP "\fBvendor:Name\fR" 4 .IX Item "vendor:Name" The current vendor name (since dpkg 1.20.0). This value comes from the \fBVendor\fR field for the current vendor's origin file, as \fBdpkg-vendor\fR(1) would retrieve it. .IP "\fBvendor:Id\fR" 4 .IX Item "vendor:Id" The current vendor \s-1ID\s0 (since dpkg 1.20.0). This is just the lowercase variant of \fBvendor:Name\fR. .IP "\fBsource:Version\fR" 4 .IX Item "source:Version" The source package version (since dpkg 1.13.19). .IP "\fBsource:Upstream\-Version\fR" 4 .IX Item "source:Upstream-Version" The upstream source package version, including the Debian version epoch if any (since dpkg 1.13.19). .IP "\fBbinary:Version\fR" 4 .IX Item "binary:Version" The binary package version (which may differ from \fBsource:Version\fR in a binNMU for example; since dpkg 1.13.19). .IP "\fBSource-Version\fR" 4 .IX Item "Source-Version" The source package version (from the changelog file). This variable is now \&\fBobsolete\fR and emits an error when used as its meaning is different from its function, please use the \fBsource:Version\fR or \fBbinary:Version\fR as appropriate. .IP "\fBsource:Synopsis\fR" 4 .IX Item "source:Synopsis" The source package synopsis, extracted from the source stanza \&\fBDescription\fR field, if it exists (since dpkg 1.19.0). .IP "\fBsource:Extended\-Description\fR" 4 .IX Item "source:Extended-Description" The source package extended description, extracted from the source stanza \&\fBDescription\fR field, if it exists (since dpkg 1.19.0). .IP "\fBInstalled-Size\fR" 4 .IX Item "Installed-Size" The approximate total size of the package's installed files. This value is copied into the corresponding control file field; setting it will modify the value of that field. If this variable is not set \&\fBdpkg-gencontrol\fR will compute the default value by accumulating the size of each regular file and symlink rounded to 1 KiB used units, and a baseline of 1 KiB for any other filesystem object type. With hardlinks only being counted once as a regular file. .Sp \&\fBNote:\fR Take into account that this can only ever be an approximation, as the actual size used on the installed system will depend greatly on the filesystem used and its parameters, which might end up using either more or less space than the specified in this field. .IP "\fBExtra-Size\fR" 4 .IX Item "Extra-Size" Additional disk space used when the package is installed. If this variable is set its value is added to that of the \&\fBInstalled-Size\fR variable (whether set explicitly or using the default value) before it is copied into the \&\fBInstalled-Size\fR control file field. .IP "\fBS:\fR\fIfieldname\fR" 4 .IX Item "S:fieldname" The value of the source stanza field \&\fIfieldname\fR (which must be given in the canonical capitalisation; since dpkg 1.18.11). Setting these variables has no effect other than on places where they are expanded explicitly. These variables are only available when generating binary control files. .IP "\fBF:\fR\fIfieldname\fR" 4 .IX Item "F:fieldname" The value of the output field \&\fIfieldname\fR (which must be given in the canonical capitalisation). Setting these variables has no effect other than on places where they are expanded explicitly. .IP "\fBFormat\fR" 4 .IX Item "Format" The \&\fB.changes\fR file format version generated by this version of the source packaging scripts. If you set this variable the contents of the \&\fBFormat\fR field in the \&\fB.changes\fR file will change too. .IP "\fBNewline\fR, \fBSpace\fR, \fBTab\fR" 4 .IX Item "Newline, Space, Tab" These variables each hold the corresponding character. .IP "\fBshlibs:\fR\fIdependencyfield\fR" 4 .IX Item "shlibs:dependencyfield" Variable settings with names of this form are generated by \&\fBdpkg-shlibdeps\fR. .IP "\fBdpkg:Upstream\-Version\fR" 4 .IX Item "dpkg:Upstream-Version" The upstream version of dpkg (since dpkg 1.13.19). .IP "\fBdpkg:Version\fR" 4 .IX Item "dpkg:Version" The full version of dpkg (since dpkg 1.13.19). .PP If a variable is referred to but not defined it generates a warning and an empty value is assumed. .SH "FILES" .IX Header "FILES" .IP "\fBdebian/substvars\fR" 4 .IX Item "debian/substvars" List of substitution variables and values. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdpkg\fR(1), \&\fBdpkg-vendor\fR(1), \&\fBdpkg-genchanges\fR(1), \&\fBdpkg-gencontrol\fR(1), \&\fBdpkg-shlibdeps\fR(1), \&\fBdpkg-source\fR(1).