[nginx/f21] systemd is fedora 16+ or EL7
Warren Togami
wtogami at fedoraproject.org
Wed Jul 30 03:59:19 UTC 2014
commit 23f650d0c70048722be3db288d6b808265511a42
Author: Warren Togami <warren at slickage.com>
Date: Tue Jul 29 17:59:01 2014 -1000
systemd is fedora 16+ or EL7
nginx.spec | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/nginx.spec b/nginx.spec
index 83a87c1..9efb5eb 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -18,10 +18,16 @@
%global with_aio 1
%endif
+%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
+%global with_systemd 1
+%else
+%global with_systemd 0
+%endif
+
Name: nginx
Epoch: 1
Version: 1.6.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A high performance web server and reverse proxy server
Group: System Environment/Daemons
@@ -68,7 +74,7 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $ve
Requires(pre): shadow-utils
Provides: webserver
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
@@ -107,7 +113,7 @@ export DESTDIR=%{buildroot}
--http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
--http-uwsgi-temp-path=%{nginx_home_tmp}/uwsgi \
--http-scgi-temp-path=%{nginx_home_tmp}/scgi \
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
--pid-path=/run/nginx.pid \
--lock-path=/run/lock/subsys/nginx \
%else
@@ -158,7 +164,7 @@ find %{buildroot} -type f -name .packlist -exec rm -f '{}' \;
find %{buildroot} -type f -name perllocal.pod -exec rm -f '{}' \;
find %{buildroot} -type f -empty -exec rm -f '{}' \;
find %{buildroot} -type f -iname '*.so' -exec chmod 0755 '{}' \;
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
install -p -D -m 0644 %{SOURCE10} \
%{buildroot}%{_unitdir}/nginx.service
%else
@@ -201,7 +207,7 @@ getent passwd %{nginx_user} > /dev/null || \
exit 0
%post
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
%systemd_post nginx.service
%else
if [ $1 -eq 1 ]; then
@@ -216,7 +222,7 @@ if [ $1 -eq 2 ]; then
fi
%preun
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
%systemd_preun nginx.service
%else
if [ $1 -eq 0 ]; then
@@ -226,7 +232,7 @@ fi
%endif
%postun
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
%systemd_postun nginx.service
%else
if [ $1 -eq 2 ]; then
@@ -242,7 +248,7 @@ fi
%{_mandir}/man3/nginx.3pm*
%{_mandir}/man8/nginx.8*
%{_mandir}/man8/nginx-upgrade.8*
-%if 0%{?fedora} >= 16
+%if 0%{?with_systemd}
%{_unitdir}/nginx.service
%else
%{_initrddir}/nginx
@@ -275,6 +281,9 @@ fi
%changelog
+* Tue Jul 29 2014 Warren Togami <warren at slickage.com> - 1:1.6.0-4
+- systemd is fedora 16+ or EL7
+
* Wed Jul 02 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1:1.6.0-3
- Fix FTBFS on aarch64 (#1115559)
More information about the scm-commits
mailing list