man > deb-substvars(5)

🏷️ NAME

deb-substvars - Debian source substitution variables

🚀 Quick Reference

Use CaseCommandDescription
Set custom substitution variablesdebian/substvarsFile with lines of name=value; comment lines start with #.
Use variable in control field${variable-name}Reference a variable anywhere in control fields.
Use built-in source version${source:Version}Expands to the source package version.
Use built-in binary version${binary:Version}Expands to the binary package version (may differ in binNMU).
Override installed size${Installed-Size}Set to override the default computed installed size.
Add extra disk space${Extra-Size}Additional space added to Installed-Size.
Use shlibs dependencies${shlibs:Depends}Generated by dpkg-shlibdeps for shared library dependencies.
Escape literal ${${}{VARIABLE}Produces ${VARIABLE} in output.

📜 SYNOPSIS

debian/substvars, debian/binary-package.substvars

📖 DESCRIPTION

Before dpkg-source, dpkg-gencontrol and dpkg-genchanges write their control information (to the source control file .dsc for dpkg-source and to standard output for dpkg-gencontrol and dpkg-genchanges) they perform some variable substitutions on the output file.

A variable substitution has the form ${variable-name}. 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.

After all the substitutions have been done each occurrence of the string ${} (which is not a legal substitution) is replaced with a $ sign. This can be used as an escape sequence such as ${}{VARIABLE} which will end up as ${VARIABLE} on the output.

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 Package, Source and Architecture fields.

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 ${Description} is set to "foo is bar.${Newline}foo is great." and if you have the following field:

 Description: foo application
  ${Description}
  .
  More text.

It will result in:

 Description: foo application
  foo is bar.
  foo is great.
  .
  More text.

Variables can be set using the -V common option. They can be also specified in the file debian/substvars (or whatever other file is specified using the -T option). This file consists of lines of the form name=value. Trailing whitespace on each line, blank lines, and lines starting with a # symbol (comments) are ignored.

Additionally, the following standard variables are available:

If a variable is referred to but not defined it generates a warning and an empty value is assumed.

📁 FILES

👀 SEE ALSO

dpkg(1), dpkg-vendor(1), dpkg-genchanges(1), dpkg-gencontrol(1), dpkg-shlibdeps(1), dpkg-source(1).

deb-substvars(5)
🏷️ NAME 🚀 Quick Reference 📜 SYNOPSIS 📖 DESCRIPTION 📁 FILES 👀 SEE ALSO

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 00:11 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^