From: Vincent Bernat Date: Sat, 20 Feb 2016 17:52:20 +0000 (+0100) Subject: redhat: fix parentheses on conditions X-Git-Tag: 0.9.2~59 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Flldpd.git;a=commitdiff_plain;h=d788766d6f2dd29b644bf90b0c17fb15a7fec0c0 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. --- 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