EL <6 provide perl-ExtUtils-Embed with base perl
[collectd.git] / contrib / redhat / collectd.spec
index 2e374c6..a5ca146 100644 (file)
@@ -43,7 +43,6 @@
 %{?el6:%global _has_recent_libganglia 1}
 %{?el6:%global _has_working_libiptc 1}
 %{?el6:%global _has_ip_vs_h 1}
-%{?el6:%global _has_perl_extutils_embed 1}
 %{?el6:%global _has_libmodbus 1}
 
 # plugins enabled by default
 %define with_nut 0%{!?_without_nut:1}
 %define with_olsrd 0%{!?_without_olsrd:1}
 %define with_openvpn 0%{!?_without_openvpn:1}
-%define with_perl 0%{!?_without_perl:0%{?_has_perl_extutils_embed}}
+%define with_perl 0%{!?_without_perl:1}
 %define with_pinba 0%{!?_without_pinba:1}
 %define with_ping 0%{!?_without_ping:1}
 %define with_postgresql 0%{!?_without_postgresql:1}
@@ -452,7 +451,11 @@ 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
+BuildRequires: perl
+%endif
 %description perl
 The Perl plugin embeds a Perl interpreter into collectd and exposes the
 application programming interface (API) to Perl-scripts.