From: Vincent Bernat Date: Sat, 21 Jan 2017 11:59:09 +0000 (+0100) Subject: redhat: add support for JSON in CentOS >= 6 X-Git-Tag: 0.9.6~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2a9d6681b0fdf87cc6922764f8c665eba5368b4;p=thirdparty%2Flldpd.git 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 --- 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)