Consistently use '%global with_foo' style of logic

This commit is contained in:
Jamie Nguyen 2015-10-04 06:56:54 +01:00
parent b715d5706f
commit cd3634a6a5

View File

@ -19,9 +19,7 @@
%endif %endif
%if 0%{?fedora} > 22 %if 0%{?fedora} > 22
%bcond_without mailcap_mimetypes %global with_mailcap_mimetypes 1
%else
%bcond_with mailcap_mimetypes
%endif %endif
Name: nginx Name: nginx
@ -72,7 +70,7 @@ Requires: openssl
Requires: pcre Requires: pcre
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires(pre): nginx-filesystem Requires(pre): nginx-filesystem
%if %{with mailcap_mimetypes} %if 0%{?with_mailcap_mimetypes}
Requires: nginx-mimetypes Requires: nginx-mimetypes
%endif %endif
Provides: webserver Provides: webserver
@ -190,8 +188,8 @@ install -p -m 0644 %{SOURCE101} %{SOURCE102} \
install -p -m 0644 %{SOURCE103} %{SOURCE104} \ install -p -m 0644 %{SOURCE103} %{SOURCE104} \
%{buildroot}%{nginx_webroot} %{buildroot}%{nginx_webroot}
%if %{with mailcap_mimetypes} %if 0%{?with_mailcap_mimetypes}
rm %{buildroot}%{_sysconfdir}/nginx/mime.types rm -f %{buildroot}%{_sysconfdir}/nginx/mime.types
%endif %endif
install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \ install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \
@ -244,7 +242,7 @@ fi
%config(noreplace) %{nginx_confdir}/fastcgi_params.default %config(noreplace) %{nginx_confdir}/fastcgi_params.default
%config(noreplace) %{nginx_confdir}/koi-utf %config(noreplace) %{nginx_confdir}/koi-utf
%config(noreplace) %{nginx_confdir}/koi-win %config(noreplace) %{nginx_confdir}/koi-win
%if ! %{with mailcap_mimetypes} %if ! 0%{?with_mailcap_mimetypes}
%config(noreplace) %{nginx_confdir}/mime.types %config(noreplace) %{nginx_confdir}/mime.types
%endif %endif
%config(noreplace) %{nginx_confdir}/mime.types.default %config(noreplace) %{nginx_confdir}/mime.types.default