| |
@@ -6,15 +6,21 @@
|
| |
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
|
| |
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
|
| |
|
| |
- %if 0%{?fedora} > 12
|
| |
+ %if 0%{?fedora} || 0%{?rhel} > 7
|
| |
%global with_python3 1
|
| |
%else
|
| |
%global with_python3 0
|
| |
%endif
|
| |
|
| |
+ %if 0%{?fedora} || 0%{?rhel} <= 7
|
| |
+ %global with_python2 1
|
| |
+ %else
|
| |
+ %global with_python2 0
|
| |
+ %endif
|
| |
+
|
| |
Name: mod_wsgi
|
| |
Version: 4.6.2
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: A WSGI interface for Python web applications in Apache
|
| |
Group: System Environment/Libraries
|
| |
License: ASL 2.0
|
| |
@@ -25,7 +31,7 @@
|
| |
Patch1: mod_wsgi-4.5.20-exports.patch
|
| |
|
| |
BuildRequires: httpd-devel
|
| |
- BuildRequires: python2-sphinx
|
| |
+ BuildRequires: python-sphinx
|
| |
BuildRequires: gcc
|
| |
|
| |
# Suppress auto-provides for module DSO
|
| |
@@ -44,6 +50,7 @@
|
| |
|
| |
%description %_description
|
| |
|
| |
+ %if 0%{?with_python2} > 0
|
| |
%package -n python2-%{name}
|
| |
Summary: %summary
|
| |
Requires: httpd-mmn = %{_httpd_mmn}
|
| |
@@ -56,6 +63,7 @@
|
| |
|
| |
%description -n python2-%{name} %_description
|
| |
|
| |
+ %endif
|
| |
|
| |
%if 0%{?with_python3} > 0
|
| |
%package -n python3-%{name}
|
| |
@@ -80,9 +88,12 @@
|
| |
|
| |
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
|
| |
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
| |
+
|
| |
+ %if 0%{?with_python2} > 0
|
| |
%configure --enable-shared --with-apxs=%{_httpd_apxs}
|
| |
make %{?_smp_mflags}
|
| |
%py2_build
|
| |
+ %endif
|
| |
|
| |
%if 0%{?with_python3} > 0
|
| |
pushd %{py3dir}
|
| |
@@ -110,6 +121,8 @@
|
| |
|
| |
%endif
|
| |
|
| |
+ # second install python2 variant
|
| |
+ %if 0%{?with_python2} > 0
|
| |
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
|
| |
|
| |
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
|
| |
@@ -119,7 +132,9 @@
|
| |
%py2_install
|
| |
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-2}
|
| |
ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
|
| |
+ %endif
|
| |
|
| |
+ %if 0%{?with_python2} > 0
|
| |
%files -n python2-%{name}
|
| |
%license LICENSE
|
| |
%doc CREDITS.rst README.rst
|
| |
@@ -129,6 +144,7 @@
|
| |
%{python2_sitearch}/mod_wsgi
|
| |
%{_bindir}/mod_wsgi-express-2
|
| |
%{_bindir}/mod_wsgi-express
|
| |
+ %endif
|
| |
|
| |
%if 0%{?with_python3} > 0
|
| |
%files -n python3-%{name}
|
| |
@@ -142,6 +158,10 @@
|
| |
%endif
|
| |
|
| |
%changelog
|
| |
+ * Thu Mar 22 2018 Troy Dawson <tdawson@redhat.com> - 4.6.2-2
|
| |
+ - Update conditionals.
|
| |
+ - Make preperations for non-python2 builds
|
| |
+
|
| |
* Tue Mar 13 2018 Matthias Runge <mrunge@redhat.com> - 4.6.2-1
|
| |
- update to 4.6.2 (rhbz#1514768)
|
| |
- add gcc BR
|
| |
Yet I don't understand this change here. That's the reason this package is still "bad" at http://fedora.portingdb.xyz/namingpolicy/