C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Scriptlets
 

Scriptlets

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

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 the section called Build-time Scripts in Chapter 13.

%prep Directive -- Unpack archives and apply patches.

The %prep can contain any valid sh commands.
%prep
          

See also: the section called The %prep Script in Chapter 13.

%build Directive -- Configure and compile components to be packaged.

The %build scriptlet is the second scriptlet executed during a build, immediately after %prep can contain any valid sh commands.
%build
          

See also: the section called The %build Script in Chapter 13.

%install Directive -- Install components to be packaged.

The %install scriptlet is the third scriptlet executed during a build, immediately after %build any valid sh commands.
%install
          

See also: the section called The %install Script in Chapter 13.

%clean Directive -- Remove build components.

The %cleansh commands.
%clean
          

See also: the section called The %clean Script in Chapter 13.

Install/Erase Scriptlets

sh commands.

-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:

For more information on this environment variable please see the section called Install/Erase-time Scripts in Chapter 13.

The %pre Script

The %pre scriptlet executes just before the package is to be installed.
%pre
          

See also: the section called The %pre Script in Chapter 13.

The %post Script

The %post scriptlet executes just after the package is to be installed.
%post
          

See also: the section called The %post Script in Chapter 13.

The %preun Script

The %preun scriptlet executes just before the package is to be erased.
%preun
          

See also: the section called The %preun Script in Chapter 13.

%postun Directive

The %postun scriptlet executes just after the package is to be erased.
%postun
          

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.

Главная