Spec cleanup, enable needlessly disabled debuginfo package

This commit is contained in:
Miro Hrončok 2021-08-04 14:41:51 +02:00
parent 9a285a3273
commit af09b794e7

View File

@ -8,15 +8,10 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_without python3
%bcond_with python2
%else
%bcond_with python3
%endif
%if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
%bcond_without python2
%else
%bcond_with python2
%global debug_package %{nil}
%endif
Name: mod_wsgi
@ -30,9 +25,9 @@ Source1: wsgi.conf
Source2: wsgi-python3.conf
Patch1: mod_wsgi-4.5.20-exports.patch
BuildRequires: make
BuildRequires: httpd-devel
BuildRequires: gcc
BuildRequires: make
# Suppress auto-provides for module DSO
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
@ -54,10 +49,11 @@ Summary: %summary
Requires: httpd-mmn = %{_httpd_mmn}
BuildRequires: python2-devel, python2-setuptools
%{?python_provide:%python_provide python2-%{name}}
# Remove before F30
%if 0%{?rhel} && 0%{?rhel} <= 7
Provides: mod_wsgi = %{version}-%{release}
Provides: mod_wsgi%{?_isa} = %{version}-%{release}
Obsoletes: mod_wsgi < %{version}-%{release}
%endif
%description -n python2-%{name} %_description
@ -86,7 +82,7 @@ Obsoletes: mod_wsgi < %{version}-%{release}
%build
%if %{with python3}
make -C docs html SPHINXBUILD=%{_bindir}/sphinx-build-3
%make_build -C docs html
%endif
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
@ -98,15 +94,15 @@ mkdir py3build/
# into itself) but we don't mind, so || :
cp -R * py3build/ || :
pushd py3build
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
%{make_build}
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=%{python3}
%make_build
%py3_build
popd
%endif
%if %{with python2}
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python2
%{make_build}
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=%{python2}
%make_build
%py2_build
%endif
@ -166,6 +162,7 @@ ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
%changelog
* Wed Aug 04 2021 Miro Hrončok <mhroncok@redhat.com> - 4.9.0-1
- Update to 4.9.0
- Enable needlessly disabled debuginfo package
- Fixes: rhbz#1960695
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-3