From 602d8828fe4ead5148a261af0f9e81b6b9b720ea Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 4 Jun 2016 14:18:57 +0200 Subject: [PATCH] collectd.spec: only require python26 on RHEL < 6 Otherwise the else clause in the condition matches on Fedora too. This makes the spec build on Fedora. --- contrib/redhat/collectd.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index ce37c52a..c8c1c258 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -603,10 +603,10 @@ Summary: Perl plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - %if 0%{?rhel} >= 6 -BuildRequires: perl-ExtUtils-Embed - %else + %if 0%{?rhel} && 0%{?rhel} < 6 BuildRequires: perl + %else +BuildRequires: perl-ExtUtils-Embed %endif %description perl The Perl plugin embeds a Perl interpreter into collectd and exposes the @@ -651,10 +651,10 @@ database. Summary: Python plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} - %if 0%{?rhel} >= 6 -BuildRequires: python-devel - %else + %if 0%{?rhel} && 0%{?rhel} < 6 BuildRequires: python26-devel + %else +BuildRequires: python-devel %endif %description python The Python plugin embeds a Python interpreter into collectd and exposes the @@ -1369,10 +1369,10 @@ Collectd utilities %endif %if %{with_python} - %if 0%{?rhel} >= 6 -%define _with_python --enable-python - %else + %if 0%{?rhel} && 0%{?rhel} < 6 %define _with_python --enable-python --with-python=%{_bindir}/python2.6 + %else +%define _with_python --enable-python %endif %else %define _with_python --disable-python -- 2.30.2