From f423152125d11d8590712061755d98a4878e528c Mon Sep 17 00:00:00 2001 From: Christopher Meng Date: Thu, 19 Jun 2014 15:38:02 +0800 Subject: [PATCH] Use more conditional lines. --- redis.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/redis.spec b/redis.spec index 52b86de..c6a7912 100644 --- a/redis.spec +++ b/redis.spec @@ -11,6 +11,7 @@ %global with_systemd 0 %endif +# tcl 8.4 in EL5. %if 0%{?el} && 0%{?el} <= 5 %global with_tests 0 %else @@ -38,14 +39,19 @@ Patch2: redis-2.8.11-use-system-jemalloc.patch Patch3: redis-2.8.11-disable-test-failed-on-slow-machine.patch %if 0%{?with_perftools} BuildRequires: gperftools-devel -%endif +%else BuildRequires: jemalloc-devel +%endif +%if 0%{?el} && 0%{?el} <= 5 BuildRequires: procps-ng +%else +BuildRequires: procps +%endif %if 0%{?with_systemd} BuildRequires: systemd %endif %if 0%{?with_tests} -BuildRequires: tcl >= 8.5 +BuildRequires: tcl %endif Requires: logrotate Requires(pre): shadow-utils @@ -159,10 +165,12 @@ install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}-server chmod 755 %{buildroot}%{_bindir}/%{name}-* %check +%if 0%{?with_tests} make test %if 0%{?with_sentinel} make test-sentinel %endif +%endif %pre getent group %{name} &> /dev/null || groupadd -r %{name} &> /dev/null