From 5ce679587a720b83ac9418cfff5ee7288895a13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 25 Sep 2015 09:16:03 +0300 Subject: [PATCH] Use nginx-mimetypes from mailcap (#1248736) --- nginx.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nginx.spec b/nginx.spec index 2676381..6f4cc37 100644 --- a/nginx.spec +++ b/nginx.spec @@ -18,6 +18,12 @@ %global with_aio 1 %endif +%if 0%{?fedora} > 22 +%bcond_without mailcap_mimetypes +%else +%bcond_with mailcap_mimetypes +%endif + Name: nginx Epoch: 1 Version: 1.8.0 @@ -66,6 +72,9 @@ Requires: openssl Requires: pcre Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires(pre): nginx-filesystem +%if %{with mailcap_mimetypes} +Requires: nginx-mimetypes +%endif Provides: webserver BuildRequires: systemd @@ -181,6 +190,10 @@ install -p -m 0644 %{SOURCE101} %{SOURCE102} \ install -p -m 0644 %{SOURCE103} %{SOURCE104} \ %{buildroot}%{nginx_webroot} +%if %{with mailcap_mimetypes} +rm %{buildroot}%{_sysconfdir}/nginx/mime.types +%endif + install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \ %{buildroot}%{_mandir}/man8/nginx.8 @@ -230,7 +243,9 @@ fi %config(noreplace) %{nginx_confdir}/fastcgi_params.default %config(noreplace) %{nginx_confdir}/koi-utf %config(noreplace) %{nginx_confdir}/koi-win +%if ! %{with mailcap_mimetypes} %config(noreplace) %{nginx_confdir}/mime.types +%endif %config(noreplace) %{nginx_confdir}/mime.types.default %config(noreplace) %{nginx_confdir}/nginx.conf %config(noreplace) %{nginx_confdir}/nginx.conf.default @@ -256,6 +271,8 @@ fi %changelog +* Fri Sep 25 2015 Ville Skyttä +- Use nginx-mimetypes from mailcap (#1248736) * Thu Sep 10 2015 Jamie Nguyen - 1:1.8.0-12 - also build with gperftools on aarch64 (#1258412)