E.3. Scriptlets

This section lists the various scriptlets found in a spec file.

E.3.1. Build Scriptlets

Every build scriptlet has the following environment variables defined:

For more information on these environment variables, and build scriptlets in general, please see Section 13.3.1.

E.3.2. Install/Erase Scriptlets

These scriptlets are executed whenever the package is installed or erased. Each scriptlet can contain any valid sh commands.

Note: Each of the following scriptlet can be made specific to a particular subpackage by adding the subpackage name, and optionally, the -n option:

%post bar

%preun -n bar
        

The subpackage name and usage of the -n option must match those defined with the %package directive.

Each scriptlet has the following environment variable defined:

  • RPM_INSTALL_PREFIX

For more information on this environment variable please see Section 13.3.2.

E.3.3. %verifyscript Directive

This section describes the verification script.