Consistently use '%global with_foo' style of logic
This commit is contained in:
parent
b715d5706f
commit
cd3634a6a5
16
nginx.spec
16
nginx.spec
@ -10,18 +10,16 @@
|
|||||||
|
|
||||||
# gperftools exist only on selected arches
|
# gperftools exist only on selected arches
|
||||||
%ifarch %{ix86} x86_64 ppc ppc64 %{arm} aarch64
|
%ifarch %{ix86} x86_64 ppc ppc64 %{arm} aarch64
|
||||||
%global with_gperftools 1
|
%global with_gperftools 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# AIO missing on some arches
|
# AIO missing on some arches
|
||||||
%ifnarch aarch64
|
%ifnarch aarch64
|
||||||
%global with_aio 1
|
%global with_aio 1
|
||||||
%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
|
||||||
|
Loading…
Reference in New Issue
Block a user