From f2a9d6681b0fdf87cc6922764f8c665eba5368b4 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 21 Jan 2017 12:59:09 +0100 Subject: [PATCH] redhat: add support for JSON in CentOS >= 6 This seems supported in RHEL now, but doesn't work on OSC: https://rhn.redhat.com/errata/RHEA-2014-1530.html Fix #220 --- redhat/lldpd.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/redhat/lldpd.spec b/redhat/lldpd.spec index ab8b814c..c4479582 100644 --- a/redhat/lldpd.spec +++ b/redhat/lldpd.spec @@ -14,7 +14,6 @@ %bcond_without dot3 %bcond_without custom %bcond_without snmp -%bcond_with json # On RHEL <= 6, compile with oldies # For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12. @@ -24,6 +23,13 @@ %bcond_with oldies %endif +# On RHEL and SLES, compile without JSON support +%if (0%{?rhel_version} > 0) || (0%{?centos_version} > 0 && 0%{?centos_version} < 600) || (0%{?suse_version} > 0) +%bcond_with json +%else +%bcond_without json +%endif + # On RHEL < 7, disable systemd # On SuSE < 12, disable systemd %if (0%{?rhel_version} > 0 && 0%{?rhel_version} < 700) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) || (0%{?suse_version} > 0 && 0%{?suse_version} < 1210) -- 2.39.5