Add logic for EPEL 7

This commit is contained in:
Jamie Nguyen 2014-08-05 15:49:52 +01:00
parent 5a305d683a
commit 3c10ed06a9

View File

@ -18,6 +18,12 @@
%global with_aio 1 %global with_aio 1
%endif %endif
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
%global with_systemd 1
%else
%global with_systemd 0
%endif
Name: nginx Name: nginx
Epoch: 1 Epoch: 1
Version: 1.6.1 Version: 1.6.1
@ -68,7 +74,7 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $ve
Requires(pre): shadow-utils Requires(pre): shadow-utils
Provides: webserver Provides: webserver
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
BuildRequires: systemd BuildRequires: systemd
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
@ -107,7 +113,7 @@ export DESTDIR=%{buildroot}
--http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \ --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
--http-uwsgi-temp-path=%{nginx_home_tmp}/uwsgi \ --http-uwsgi-temp-path=%{nginx_home_tmp}/uwsgi \
--http-scgi-temp-path=%{nginx_home_tmp}/scgi \ --http-scgi-temp-path=%{nginx_home_tmp}/scgi \
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/run/lock/subsys/nginx \ --lock-path=/run/lock/subsys/nginx \
%else %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 -name perllocal.pod -exec rm -f '{}' \;
find %{buildroot} -type f -empty -exec rm -f '{}' \; find %{buildroot} -type f -empty -exec rm -f '{}' \;
find %{buildroot} -type f -iname '*.so' -exec chmod 0755 '{}' \; find %{buildroot} -type f -iname '*.so' -exec chmod 0755 '{}' \;
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
install -p -D -m 0644 %{SOURCE10} \ install -p -D -m 0644 %{SOURCE10} \
%{buildroot}%{_unitdir}/nginx.service %{buildroot}%{_unitdir}/nginx.service
%else %else
@ -201,7 +207,7 @@ getent passwd %{nginx_user} > /dev/null || \
exit 0 exit 0
%post %post
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
%systemd_post nginx.service %systemd_post nginx.service
%else %else
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
@ -216,7 +222,7 @@ if [ $1 -eq 2 ]; then
fi fi
%preun %preun
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
%systemd_preun nginx.service %systemd_preun nginx.service
%else %else
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
@ -226,7 +232,7 @@ fi
%endif %endif
%postun %postun
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
%systemd_postun nginx.service %systemd_postun nginx.service
%else %else
if [ $1 -eq 2 ]; then if [ $1 -eq 2 ]; then
@ -242,7 +248,7 @@ fi
%{_mandir}/man3/nginx.3pm* %{_mandir}/man3/nginx.3pm*
%{_mandir}/man8/nginx.8* %{_mandir}/man8/nginx.8*
%{_mandir}/man8/nginx-upgrade.8* %{_mandir}/man8/nginx-upgrade.8*
%if 0%{?fedora} >= 16 %if 0%{?with_systemd}
%{_unitdir}/nginx.service %{_unitdir}/nginx.service
%else %else
%{_initrddir}/nginx %{_initrddir}/nginx
@ -275,6 +281,9 @@ fi
%changelog %changelog
* Tue Aug 05 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1:1.6.1-2
- add logic for EPEL 7
* Tue Aug 05 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1:1.6.1-1 * Tue Aug 05 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1:1.6.1-1
- update to upstream release 1.6.1 - update to upstream release 1.6.1
- (#1126891) CVE-2014-3556: SMTP STARTTLS plaintext injection flaw - (#1126891) CVE-2014-3556: SMTP STARTTLS plaintext injection flaw