substvars file

The WPKG (or DEBIAN) directory may include a substvars file. The substvars name stands for Substitution Variables.

These variables are used by the control_file class to substitue the ${...} variable references with the content of variables defined on the command line with the --field-variables and in the substvars file.

The format of the substvars is one variable per line defined as name, equal sign, and value of the variable. Empty lines and lines that start with a hash (#) sign are ignored as comments.

Example:

# Our company specific vendor
SOFTWARE_VENDOR=m2osw

This variable can then be used in your control file as:

Architecture: win32-${SOFTWARE_DISTRIBUTION}-i386

The substvars is expected to be dynamically created when you build your project from source especially since the format of the substvars is very simple so it is easy to generate and add variables to it. This way the control file remains a static file. Note also that it is compatible with a standard shell script (sh or bash.)