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

Conditionals

The %ifxxx system specifiers, each separated by commas or whitespace.

The %ifarch Conditional

If the build system's architecture is specified, the part of the spec file following the %ifarch, but before a %else or %endif will be used during the build.
%ifarch i386 sparc
        

See also: the section called The %ifarch Conditional in Chapter 13.

The %ifnarch Conditional

If the build system's architecture is specified, the part of the spec file following the %ifarch but before a %else or %endif will not be used during the build.
%ifnarch i386 sparc
        

See also: the section called The %ifnarch Conditional in Chapter 13.

The %ifos Conditional

%ifos but before a %else or %endif will be used during the build.
%ifos linux
        

See also: the section called The %ifos Conditional in Chapter 13.

The %ifnos Conditional

%ifnos but before a %else or %endif will not be used during the build.
%ifnos linux
        

See also: the section called The %ifnos Conditional in Chapter 13.

The %else Conditional

The %else conditional is placed between a %if conditional of some persuasion, and an %endif. It is used to create two blocks of spec file statements, only one of which will be used in any given case.
%ifarch alpha
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -I ."
%else
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
%endif
        

See also: the section called The %else Conditional in Chapter 13.

The %endif Conditional

An %endif is used to end a conditional block of spec file statements. The %endif is always needed after a conditional, otherwise, the build will fail.
%ifarch i386
make INTELFLAG=-DINTEL
%endif
        

See also: the section called The %endif Conditional in Chapter 13.

Главная