]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
redhat: fix parentheses on conditions
authorVincent Bernat <vincent@bernat.im>
Sat, 20 Feb 2016 17:52:20 +0000 (18:52 +0100)
committerVincent Bernat <vincent@bernat.im>
Sat, 20 Feb 2016 17:52:20 +0000 (18:52 +0100)
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

index 59f3145ca78fbe4ec1999149b8f96adfabec788d..88e1b49bc3e82b29ebc8d81f19c40ee7dc0d49b5 100644 (file)
@@ -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
 
 # 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