260 lines
7.3 KiB
HTML
260 lines
7.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of deb-substvars</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>deb-substvars</H1>
|
|
Section: dpkg suite (5)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
deb-substvars - Debian source substitution variables
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
substvars
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Before
|
|
<B>dpkg-source</B>, <B>dpkg-gencontrol</B> and <B>dpkg-genchanges</B>
|
|
|
|
write their control information (to the source control file
|
|
<B>.dsc</B>
|
|
|
|
for
|
|
<B>dpkg-source</B>
|
|
|
|
and to standard output for
|
|
<B>dpkg-gencontrol</B> and <B>dpkg-genchanges</B>)
|
|
|
|
they perform some variable substitutions on the output file.
|
|
<P>
|
|
A variable substitution has the form
|
|
<B>${</B><I>variable-name</I><B>}</B>.
|
|
|
|
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.
|
|
<P>
|
|
After all the substitutions have been done each occurrence of the
|
|
string
|
|
<B>${}</B>
|
|
|
|
(which is not a legal substitution) is replaced with a
|
|
<B>$</B>
|
|
|
|
sign.
|
|
<P>
|
|
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 <B>Package</B>,
|
|
<B>Source</B> and <B>Architecture</B> fields.
|
|
<P>
|
|
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
|
|
<B>${Description}</B> is set to "foo is bar.${Newline}foo is
|
|
great." and if you have the following field:
|
|
<P>
|
|
<BR> Description: foo application
|
|
<BR> ${Description}
|
|
<BR> .
|
|
<BR> More text.
|
|
<P>
|
|
It will result in:
|
|
<P>
|
|
<BR> Description: foo application
|
|
<BR> foo is bar.
|
|
<BR> foo is great.
|
|
<BR> .
|
|
<BR> More text.
|
|
<P>
|
|
Variables can be set using the
|
|
<B>-V</B>
|
|
|
|
common option. They can be also specified in the file
|
|
<B>debian/substvars</B>
|
|
|
|
(or whatever other file is specified using the
|
|
<B>-T</B>
|
|
|
|
option). This file consists of lines of the form
|
|
<I>name</I><B>=</B><I>value</I>.
|
|
|
|
Trailing whitespace on each line, blank lines, and
|
|
lines starting with a
|
|
<B>#</B>
|
|
|
|
symbol (comments) are ignored.
|
|
<P>
|
|
Additionally, the following standard variables are available:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>Arch</B>
|
|
|
|
<DD>
|
|
The current host architecture (i.e. the architecture the package is being
|
|
built for, the equivalent of <B>DEB_HOST_ARCH</B>).
|
|
<DT id="2"><B>source:Version</B>
|
|
|
|
<DD>
|
|
The source package version (since dpkg 1.13.19).
|
|
<DT id="3"><B>source:Upstream-Version</B>
|
|
|
|
<DD>
|
|
The upstream source package version, including the Debian version epoch if
|
|
any (since dpkg 1.13.19).
|
|
<DT id="4"><B>binary:Version</B>
|
|
|
|
<DD>
|
|
The binary package version (which may differ from <B>source:Version</B> in
|
|
a binNMU for example; since dpkg 1.13.19).
|
|
<DT id="5"><B>Source-Version</B>
|
|
|
|
<DD>
|
|
The source package version (from the changelog file). This variable is now
|
|
<B>obsolete</B> and emits an error when used as its meaning is different from
|
|
its function, please use the <B>source:Version</B> or <B>binary:Version</B> as
|
|
appropriate.
|
|
<DT id="6"><B>source:Synopsis</B>
|
|
|
|
<DD>
|
|
The source package synopsis, extracted from the source stanza
|
|
<B>Description</B> field, if it exists (since dpkg 1.19.0).
|
|
<DT id="7"><B>source:Extended-Description</B>
|
|
|
|
<DD>
|
|
The source package extended description, extracted from the source stanza
|
|
<B>Description</B> field, if it exists (since dpkg 1.19.0).
|
|
<DT id="8"><B>Installed-Size</B>
|
|
|
|
<DD>
|
|
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
|
|
<B>dpkg-gencontrol</B>
|
|
|
|
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.
|
|
<P>
|
|
<B>Note:</B> 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.
|
|
<DT id="9"><B>Extra-Size</B>
|
|
|
|
<DD>
|
|
Additional disk space used when the package is installed. If this
|
|
variable is set its value is added to that of the
|
|
<B>Installed-Size</B>
|
|
|
|
variable (whether set explicitly or using the default value) before it
|
|
is copied into the
|
|
<B>Installed-Size</B>
|
|
|
|
control file field.
|
|
<DT id="10"><B>S:</B><I>fieldname</I>
|
|
|
|
<DD>
|
|
The value of the source stanza field
|
|
<I>fieldname</I>
|
|
|
|
(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.
|
|
<DT id="11"><B>F:</B><I>fieldname</I>
|
|
|
|
<DD>
|
|
The value of the output field
|
|
<I>fieldname</I>
|
|
|
|
(which must be given in the canonical capitalisation). Setting these
|
|
variables has no effect other than on places where they are expanded
|
|
explicitly.
|
|
<DT id="12"><B>Format</B>
|
|
|
|
<DD>
|
|
The
|
|
<B>.changes</B>
|
|
|
|
file format version generated by this version of the source packaging
|
|
scripts. If you set this variable the contents of the
|
|
<B>Format</B>
|
|
|
|
field in the
|
|
<B>.changes</B>
|
|
|
|
file will change too.
|
|
<DT id="13"><B>Newline</B>, <B>Space</B>, <B>Tab</B>
|
|
|
|
<DD>
|
|
These variables each hold the corresponding character.
|
|
<DT id="14"><B>shlibs:</B><I>dependencyfield</I>
|
|
|
|
<DD>
|
|
Variable settings with names of this form are generated by
|
|
<B>dpkg-shlibdeps</B>.
|
|
|
|
<DT id="15"><B>dpkg:Upstream-Version</B>
|
|
|
|
<DD>
|
|
The upstream version of dpkg (since dpkg 1.13.19).
|
|
<DT id="16"><B>dpkg:Version</B>
|
|
|
|
<DD>
|
|
The full version of dpkg (since dpkg 1.13.19).
|
|
</DL>
|
|
<P>
|
|
|
|
If a variable is referred to but not defined it generates a warning
|
|
and an empty value is assumed.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="17"><B>debian/substvars</B>
|
|
|
|
<DD>
|
|
List of substitution variables and values.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg">dpkg</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-genchanges">dpkg-genchanges</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-gencontrol">dpkg-gencontrol</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-shlibdeps">dpkg-shlibdeps</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-source">dpkg-source</A></B>(1).
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="18"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="19"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="20"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="21"><A HREF="#lbAE">FILES</A><DD>
|
|
<DT id="22"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:03 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|