c7d01a6
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
11c0472
64b2cb9
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
9fecf69
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
9fecf69
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
9fecf69
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
069a5e0
%{!?_httpd_moddir:    %{expand: %%global _httpd_moddir    %%{_libdir}/httpd/modules}}
c7d01a6
53d6c86
%if 0%{?fedora} > 12
53d6c86
%global with_python3 1
53d6c86
%else
11c0472
%global with_python3 0
53d6c86
%endif
53d6c86
697da5d
Name:           mod_wsgi
241a680
Version:        4.5.20
58510b6
Release:        2%{?dist}
697da5d
Summary:        A WSGI interface for Python web applications in Apache
697da5d
Group:          System Environment/Libraries
697da5d
License:        ASL 2.0
d9e63f4
URL:            https://modwsgi.readthedocs.io/
5585f33
Source0:        https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz
697da5d
Source1:        wsgi.conf
53d6c86
Source2:        wsgi-python3.conf
53d6c86
241a680
BuildRequires:  httpd-devel, python-devel
241a680
BuildRequires:  python2-sphinx
697da5d
069a5e0
# Suppress auto-provides for module DSO
db86b6c
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
069a5e0
%{?filter_setup}
069a5e0
53d6c86
11c0472
%if 0%{?with_python3} > 0
53d6c86
%package -n python3-%{name}
53d6c86
Summary:        A WSGI interface for Python3 web applications in Apache
53d6c86
Group:          System Environment/Libraries
53d6c86
Requires:       httpd-mmn = %{_httpd_mmn}
11c0472
BuildRequires:  python3-devel
53d6c86
53d6c86
%description -n python3-%{name}
53d6c86
The mod_wsgi adapter is an Apacheache module that provides a WSGI compliant
53d6c86
interface for hosting Python based web applications within Apache. The
11c0472
adapter is written completely in C code against the Apache C runtime and
53d6c86
for hosting WSGI applications within Apache has a lower overhead than using
53d6c86
existing WSGI adapters for mod_python or CGI.
11c0472
53d6c86
%endif
53d6c86
58510b6
%global _description\
58510b6
The mod_wsgi adapter is an Apache module that provides a WSGI compliant\
58510b6
interface for hosting Python based web applications within Apache. The\
58510b6
adapter is written completely in C code against the Apache C runtime and\
58510b6
for hosting WSGI applications within Apache has a lower overhead than using\
58510b6
existing WSGI adapters for mod_python or CGI.\
697da5d
697da5d
58510b6
%description %_description
58510b6
58510b6
%package -n python2-%{name}
58510b6
Summary: %summary
58510b6
Requires:       httpd-mmn = %{_httpd_mmn}
58510b6
%{?python_provide:%python_provide python2-%{name}}
58510b6
# Remove before F30
58510b6
Provides: mod_wsgi = %{version}-%{release}
58510b6
Provides: mod_wsgi%{?_isa} = %{version}-%{release}
58510b6
Obsoletes: mod_wsgi < %{version}-%{release}
58510b6
58510b6
%description -n python2-%{name} %_description
58510b6
697da5d
%prep
561c357
%setup -qn %{name}-%{version}
53d6c86
11c0472
%if 0%{?with_python3} > 0
53d6c86
cp -a . %{py3dir}
53d6c86
%endif
53d6c86
697da5d
%build
241a680
make -C docs html
241a680
f9879fb
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
bad4888
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
c7d01a6
%configure --enable-shared --with-apxs=%{_httpd_apxs}
f9879fb
make %{?_smp_mflags}
241a680
%py2_build
697da5d
11c0472
%if 0%{?with_python3} > 0
53d6c86
pushd %{py3dir}
53d6c86
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
53d6c86
make %{?_smp_mflags}
241a680
%py3_build
53d6c86
popd
53d6c86
%endif
53d6c86
697da5d
%install
53d6c86
# first install python3 variant and rename the so file
11c0472
%if 0%{?with_python3} > 0
11c0472
53d6c86
pushd %{py3dir}
53d6c86
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
53d6c86
mv  $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so
53d6c86
53d6c86
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
53d6c86
# httpd >= 2.4.x
53d6c86
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3.conf
241a680
241a680
%py3_install
241a680
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3}
53d6c86
popd
11c0472
53d6c86
%endif
53d6c86
db86b6c
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
697da5d
82e1974
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
9fecf69
# httpd >= 2.4.x
82e1974
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi.conf
697da5d
241a680
%py2_install
241a680
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-2}
241a680
ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
241a680
58510b6
%files -n python2-%{name}
Orion Poplawski c525381
%license LICENSE
Orion Poplawski c525381
%doc CREDITS.rst README.rst
53d6c86
%config(noreplace) %{_httpd_modconfdir}/*wsgi.conf
db86b6c
%{_httpd_moddir}/mod_wsgi.so
241a680
%{python2_sitearch}/mod_wsgi-*.egg-info
241a680
%{python2_sitearch}/mod_wsgi
241a680
%{_bindir}/mod_wsgi-express-2
241a680
%{_bindir}/mod_wsgi-express
697da5d
11c0472
%if 0%{?with_python3} > 0
53d6c86
%files -n python3-%{name}
Orion Poplawski c525381
%license LICENSE
Orion Poplawski c525381
%doc CREDITS.rst README.rst
53d6c86
%config(noreplace) %{_httpd_modconfdir}/*wsgi-python3.conf
53d6c86
%{_httpd_moddir}/mod_wsgi_python3.so
241a680
%{python3_sitearch}/mod_wsgi-*.egg-info
241a680
%{python3_sitearch}/mod_wsgi
241a680
%{_bindir}/mod_wsgi-express-3
53d6c86
%endif
53d6c86
53d6c86
%changelog
58510b6
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.5.20-2
58510b6
- Python 2 binary package renamed to python2-mod_wsgi
58510b6
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
58510b6
241a680
* Fri Oct 20 2017 Joe Orton <jorton@redhat.com> - 4.5.20-1
241a680
- update to 4.5.20
241a680
241a680
* Wed Aug 09 2017 Dan Callaghan <dcallagh@redhat.com> - 4.5.15-5
241a680
- include mod_wsgi Python package and mod_wsgi-express script
241a680
013f967
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.15-4
013f967
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
013f967
b7d1fc7
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.15-3
b7d1fc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b7d1fc7
Igor Gnatenko 9339249
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.5.15-2
Igor Gnatenko 9339249
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko 9339249
5585f33
* Fri Jun 23 2017 Joe Orton <jorton@redhat.com> - 4.5.15-1
5585f33
- update to 4.5.15 (#1431893)
5585f33
743a4f5
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.13-3
743a4f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
743a4f5
7e0e81e
* Tue Jan 10 2017 Jakub Dorňák <jakub.dornak@misli.cz> - 4.5.13-1
7e0e81e
- Update to 4.5.13
7e0e81e
794ad46
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.5.9-2
794ad46
- Rebuild for Python 3.6
794ad46
11c0472
* Mon Dec 05 2016 Matthias Runge <mrunge@redhat.com> - 4.5.9-1
11c0472
- upgrade to 4.5.9 (rhbz#1180445)
11c0472
dbd724f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.8-4
dbd724f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
dbd724f
4c5b1a1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.8-3
4c5b1a1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
4c5b1a1
63aa8fd
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.8-2
63aa8fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
63aa8fd
4f87bb2
* Thu Feb 12 2015 Richard W.M. Jones <rjones@redhat.com> - 4.4.8-1
4f87bb2
- Upstream to 4.4.8.
4f87bb2
- This version includes the fix for the segfault described in RHBZ#1178851.
4f87bb2
Jakub Dorňák 5aafc98
* Mon Jan  5 2015 Jakub Dorňák <jdornak@redhat.com> - 4.4.3-1
Jakub Dorňák 5aafc98
- update to new upstream version 4.4.3 (#1176914)
Jakub Dorňák 5aafc98
3307d6a
* Wed Dec 17 2014 Jan Kaluza <jkaluza@redhat.com> - 4.4.1-1
3307d6a
- update to new upstream version 4.4.1 (#1170994)
3307d6a
561c357
* Wed Nov 19 2014 Jan Kaluza <jkaluza@redhat.com> - 4.3.2-1
561c357
- update to new upstream version 4.3.2 (#1104526)
561c357
b98673f
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-3
b98673f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b98673f
2c8192a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-2
2c8192a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2c8192a
Luke Macken 9dc4549
* Thu May 29 2014 Luke Macken <lmacken@redhat.com> - 3.5-1
Luke Macken 9dc4549
- Update to 3.5 to fix CVE-2014-0240 (#1101863)
Luke Macken a659b25
- Remove all of the patches, which have been applied upstream
Luke Macken 330ddbc
- Update source URL for new the GitHub upstream
Luke Macken 9dc4549
8df6e1e
* Wed May 28 2014 Joe Orton <jorton@redhat.com> - 3.4-14
8df6e1e
- rebuild for Python 3.4
8df6e1e
7615d8e
* Mon Apr 28 2014 Matthias Runge <mrunge@redhat.com> - 3.4.13
7615d8e
- do not use conflicts between mod_wsgi packages (rhbz#1087943)
7615d8e
64b2cb9
* Thu Jan 23 2014 Joe Orton <jorton@redhat.com> - 3.4-12
64b2cb9
- fix _httpd_mmn expansion in absence of httpd-devel
64b2cb9
53d6c86
* Fri Jan 10 2014 Matthias Runge <mrunge@redhat.com> - 3.4-11
53d6c86
- added python3 subpackage (thanks to Jakub Dorňák), rhbz#1035876
53d6c86
d970903
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-10
d970903
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d970903
3fe213f
* Mon Jul  8 2013 Joe Orton <jorton@redhat.com> - 3.4-9
3fe213f
- modernize spec file (thanks to rcollet)
3fe213f
f73e9b1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-8
f73e9b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f73e9b1
bad4888
* Tue Dec 11 2012 Jan Kaluza <jkaluza@redhat.com> - 3.4-7
bad4888
- compile with -fno-strict-aliasing to workaround Python
bad4888
  bug http://www.python.org/dev/peps/pep-3123/
bad4888
db86b6c
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-6
db86b6c
- use _httpd_moddir macro
db86b6c
069a5e0
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-5
069a5e0
- spec file cleanups
069a5e0
6e3a0df
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-4
6e3a0df
- enable PR_SET_DUMPABLE in daemon process to enable core dumps
6e3a0df
76920be
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-3
76920be
- use a NULL c->sbh pointer with httpd 2.4 (possible fix for #867276)
76920be
- add logging for unexpected daemon process loss
76920be
f9879fb
* Wed Oct 17 2012 Matthias Runge <mrunge@redhat.com> - 3.4-2
f9879fb
- also use RPM_LD_FLAGS for build bz. #867137
f9879fb
ffc9997
* Mon Oct 15 2012 Matthias Runge <mrunge@redhat.com> - 3.4-1
ffc9997
- update to upstream release 3.4
ffc9997
f3b7224
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-7
f3b7224
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f3b7224
4851791
* Wed Jun 13 2012 Joe Orton <jorton@redhat.com> - 3.3-6
4851791
- add possible fix for daemon mode crash (#831701)
4851791
82e1974
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-5
82e1974
- move wsgi.conf to conf.modules.d
82e1974
83d0b05
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-4
83d0b05
- rebuild for httpd 2.4
83d0b05
c7d01a6
* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 3.3-3
c7d01a6
- prepare for httpd 2.4.x
c7d01a6
cd44df7
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-2
cd44df7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cd44df7
1db2075
* Tue Nov 01 2011 James Bowes <jbowes@redhat.com> 3.3-1
1db2075
- update to 3.3
1db2075
4b50972
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-3
4b50972
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4b50972
289b2e0
* Tue Jul 27 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-2
289b2e0
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
289b2e0
joshkayse a65d8f9
* Tue Mar  9 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.2-1
joshkayse a65d8f9
- update to 3.2
joshkayse a65d8f9
joshkayse 6bc6ede
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-2
joshkayse 6bc6ede
- removed conflicts as it violates fedora packaging policy
joshkayse 6bc6ede
joshkayse d55dfcb
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-1
joshkayse d55dfcb
- update to 3.1
joshkayse d55dfcb
- add explicit enable-shared
joshkayse d55dfcb
- add conflicts mod_python < 3.3.1
joshkayse d55dfcb
f933919
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
f933919
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f933919
17535ae
* Thu Jul 02 2009 James Bowes <jbowes@redhat.com> 2.5-1
17535ae
- Update to 2.5
17535ae
0c21814
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
0c21814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0c21814
6d6cd19
* Sun Nov 30 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.3-2
6d6cd19
- Rebuild for Python 2.6
6d6cd19
938231a
* Tue Oct 28 2008 Luke Macken <lmacken@redhat.com> 2.3-1
938231a
- Update to 2.3
938231a
06db9f3
* Mon Sep 29 2008 James Bowes <jbowes@redhat.com> 2.1-2
06db9f3
- Remove requires on httpd-devel
06db9f3
786f01f
* Wed Jul 02 2008 James Bowes <jbowes@redhat.com> 2.1-1
786f01f
- Update to 2.1
786f01f
3b56ae5
* Mon Jun 16 2008 Ricky Zhou <ricky@fedoraproject.org> 1.3-4
3b56ae5
- Build against the shared python lib.
3b56ae5
38851a5
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3-3
38851a5
- Autorebuild for GCC 4.3
38851a5
96871e8
* Sun Jan 06 2008 James Bowes <jbowes@redhat.com> 1.3-2
96871e8
- Require httpd
96871e8
fa653e6
* Sat Jan 05 2008 James Bowes <jbowes@redhat.com> 1.3-1
fa653e6
- Update to 1.3
fa653e6
697da5d
* Sun Sep 30 2007 James Bowes <jbowes@redhat.com> 1.0-1
697da5d
- Initial packaging for Fedora
697da5d