Use more conditional lines.
This commit is contained in:
		
							parent
							
								
									5a0f5c1d8b
								
							
						
					
					
						commit
						f423152125
					
				
							
								
								
									
										12
									
								
								redis.spec
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								redis.spec
									
									
									
									
									
								
							| @ -11,6 +11,7 @@ | |||||||
| %global with_systemd 0 | %global with_systemd 0 | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
|  | # tcl 8.4 in EL5. | ||||||
| %if 0%{?el} && 0%{?el} <= 5 | %if 0%{?el} && 0%{?el} <= 5 | ||||||
| %global with_tests 0 | %global with_tests 0 | ||||||
| %else | %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 | Patch3:            redis-2.8.11-disable-test-failed-on-slow-machine.patch | ||||||
| %if 0%{?with_perftools} | %if 0%{?with_perftools} | ||||||
| BuildRequires:     gperftools-devel | BuildRequires:     gperftools-devel | ||||||
| %endif | %else | ||||||
| BuildRequires:     jemalloc-devel | BuildRequires:     jemalloc-devel | ||||||
|  | %endif | ||||||
|  | %if 0%{?el} && 0%{?el} <= 5 | ||||||
| BuildRequires:     procps-ng | BuildRequires:     procps-ng | ||||||
|  | %else | ||||||
|  | BuildRequires:     procps | ||||||
|  | %endif | ||||||
| %if 0%{?with_systemd} | %if 0%{?with_systemd} | ||||||
| BuildRequires:     systemd | BuildRequires:     systemd | ||||||
| %endif | %endif | ||||||
| %if 0%{?with_tests} | %if 0%{?with_tests} | ||||||
| BuildRequires:     tcl >= 8.5 | BuildRequires:     tcl | ||||||
| %endif | %endif | ||||||
| Requires:          logrotate | Requires:          logrotate | ||||||
| Requires(pre):     shadow-utils | Requires(pre):     shadow-utils | ||||||
| @ -159,10 +165,12 @@ install -pDm755 %{S:6} %{buildroot}%{_initrddir}/%{name}-server | |||||||
| chmod 755 %{buildroot}%{_bindir}/%{name}-* | chmod 755 %{buildroot}%{_bindir}/%{name}-* | ||||||
| 
 | 
 | ||||||
| %check | %check | ||||||
|  | %if 0%{?with_tests} | ||||||
| make test | make test | ||||||
| %if 0%{?with_sentinel} | %if 0%{?with_sentinel} | ||||||
| make test-sentinel | make test-sentinel | ||||||
| %endif | %endif | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
| %pre | %pre | ||||||
| getent group %{name} &> /dev/null || groupadd -r %{name} &> /dev/null | getent group %{name} &> /dev/null || groupadd -r %{name} &> /dev/null | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user