From fa12cb8f6464956a07ee380178ce62314427e91f Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 23 Nov 2015 08:33:05 +0100 Subject: [PATCH] redhat: use system libnl3 when possible --- redhat/lldpd.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/redhat/lldpd.spec b/redhat/lldpd.spec index bbec0ee4..053184c4 100644 --- a/redhat/lldpd.spec +++ b/redhat/lldpd.spec @@ -48,6 +48,13 @@ %bcond_without system_libevent %endif +# On RHEL < 6, use embedded libnl +%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 600 || 0%{?centos_version} > 0 && 0%{?centos_version} < 600 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200 +%bcond_with system_libnl +%else +%bcond_without system_libnl +%endif + %define lldpd_user _lldpd %define lldpd_group _lldpd %define lldpd_chroot /var/run/lldpd @@ -67,6 +74,9 @@ BuildRequires: pkgconfig %if %{with system_libevent} BuildRequires: libevent-devel %endif +%if %{with system_libnl} +BuildRequires: libnl3-devel +%endif BuildRequires: readline-devel %if %{with snmp} BuildRequires: net-snmp-devel @@ -308,7 +318,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Sun Nov 22 2015 Vincent Bernat - 0.8.0-1 - New upstream version. -- Use embedded libnl3. +- Use system libnl3 when possible. - Use system libevent when possible. * Wed Sep 09 2015 Vincent Bernat - 0.7.17-1 -- 2.39.5