Fix expanding undefined el6 macro

The spec file could not been processed on Fedora:

$ fedpkg local
error: parse error in expression
error: /home/test/fedora/perl-Encode-EUCJPASCII/perl-Encode-EUCJPASCII.spec:19: bad %if condition
error: query of specfile /home/test/fedora/perl-Encode-EUCJPASCII/perl-Encode-EUCJPASCII.spec failed, can't parse

This fixes it by expanding the macro only if it is defined.
This commit is contained in:
Petr Písař 2016-05-02 15:55:46 +02:00
parent eee585cfd9
commit 29b1720088

View File

@ -16,7 +16,7 @@ BuildRequires: perl(XSLoader)
BuildRequires: perl(base)
BuildRequires: perl(Encode::CJKConstants)
BuildRequires: perl(Encode::JP::JIS7)
%if 0%{el6}
%if 0%{?el6}
BuildRequires: perl-devel
%else
BuildRequires: perl-Encode-devel