Библиотека сайта rus-linux.net
Maximum RPM: Taking the Red Hat Package Manager to the Limit | ||
---|---|---|
Prev | Appendix E. Concise Spec File Reference | Next |
Scriptlets
This section lists the various scriptlets found in a spec file.
Build Scriptlets
Every build scriptlet has the following environment variables defined:
RPM_SOURCE_DIR
RPM_BUILD_DIR
RPM_DOC_DIR
RPM_OPT_FLAGS
RPM_ARCH
RPM_OS
RPM_ROOT_DIR
RPM_BUILD_ROOT
RPM_PACKAGE_NAME
RPM_PACKAGE_VERSION
RPM_PACKAGE_RELEASE
For more information on these environment variables, and build scriptlets in general, please see the section called Build-time Scripts in Chapter 13.
%prep Directive -- Unpack archives and apply patches.
|
See also: the section called The %prep Script in Chapter 13.
%build Directive -- Configure and compile components to be packaged.
|
See also: the section called The %build Script in Chapter 13.
%install Directive -- Install components to be packaged.
|
See also: the section called The %install Script in Chapter 13.
%clean Directive -- Remove build components.
|
See also: the section called The %clean Script in Chapter 13.
Install/Erase Scriptlets
These scriptlets are executed whenever the package is installed or erased. Each scriptlet can contain any valid sh commands.
-n
option:
|
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 the section called Install/Erase-time Scripts in Chapter 13.
The %pre Script
|
The %post Script
|
See also: the section called The %post Script in Chapter 13.
The %preun Script
|
See also: the section called The %preun Script in Chapter 13.
%postun Directive
|
See also: the section called The %postun Script in Chapter 13.
%verifyscript Directive
This section describes the verification script.
The %verifyscript Script
The %verifyscript scriptlet executes whenever the
package is verified using RPM's -V
option.
The scriptlet can contain any valid sh commands.
See also: the section called Verification-Time Script — The %verifyscript Script in Chapter 13.