Application Packaging Developer's Guide

General Rules on Using Environment Variables

In the pkginfo file, a variable definition takes the form PARAM=value, where the first letter of PARAM is an uppercase letter. These variables are evaluated only at install time. If any of these variables cannot be evaluated, the pkgadd command aborts with an error.

In the prototype file, a variable definition can take the form !PARAM=value or $variable. Both PARAM and variable can begin with either an uppercase or a lowercase letter. Only variables whose values are known at build time are evaluated. If PARAM or variable is a build or install variable whose value is not known at build time, the pkgmk command aborts with an error.

You can also include the option PARAM=value as an option to the pkgmk command. This option works the same as in the prototype file, except that its scope is global to the entire package. The !PARAM=value definition in a prototype file is local to that file and the part of the package it defines.

If PARAM is an install variable, and variable is an install variable or build variable with a known value, the pkgmk command inserts the definition into the pkginfo file so that the definition will be available at install time. However, the pkgmk command does not evaluate PARAM that are in any path names that are specified in the prototype file.