From d788766d6f2dd29b644bf90b0c17fb15a7fec0c0 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 20 Feb 2016 18:52:20 +0100 Subject: [PATCH] redhat: fix parentheses on conditions For some reason, the regular precedence for "&&" and "||" doesn't work in a .spec. Use parentheses to overcome that. Also, RHEL doesn't ship with libevent-devel at all. Don't use it. --- redhat/lldpd.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redhat/lldpd.spec b/redhat/lldpd.spec index 59f3145c..88e1b49b 100644 --- a/redhat/lldpd.spec +++ b/redhat/lldpd.spec @@ -18,7 +18,7 @@ # On RHEL <= 6, compile with oldies # For SuSE, SLE11 with a recent SP comes with 3.0. SLE12 comes with 3.12. -%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 +%if (0%{?rhel_version} > 0 && 0%{?rhel_version} < 700) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) %bcond_without oldies %else %bcond_with oldies @@ -26,14 +26,14 @@ # 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} < 1200 +%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) %bcond_with systemd %else %bcond_without systemd %endif # On RHEL < 7, use embedded libevent -%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 || 0%{?centos_version} > 0 && 0%{?centos_version} < 700 || 0%{?suse_version} > 0 && 0%{?suse_version} < 1200 +%if (0%{?rhel_version} > 0) || (0%{?centos_version} > 0 && 0%{?centos_version} < 700) || (0%{?suse_version} > 0 && 0%{?suse_version} < 1200) %bcond_with system_libevent %else %bcond_without system_libevent -- 2.39.5