%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8 || 0%{?fedora} >= 30)} Name: scgi Version: 1.15 Release: 1%{?dist} Summary: Python implementation of the SCGI protocol License: CNRI URL: http://python.ca/%{name}/ Source0: http://python.ca/%{name}/releases/%{name}-%{version}.tar.gz Source1: scgi.conf Patch0: %{name}-1.15-port-to-patache24.patch %description The SCGI protocol is a replacement for the Common Gateway Interface (CGI) protocol. It is a standard for applications to interface with HTTP servers. It is similar to FastCGI but is designed to be easier to implement. %package -n mod_%{name} Summary: %{summary} BuildRequires: gcc BuildRequires: httpd-devel BuildRequires: pcre-devel Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing) %description -n mod_%{name} The SCGI protocol is a replacement for the Common Gateway Interface (CGI) protocol. It is a standard for applications to interface with HTTP servers. It is similar to FastCGI but is designed to be easier to implement. %if 0%{?with_python2} %package -n python2-%{name} Summary: %{summary} BuildRequires: python2-devel %{?python_provide:%python_provide python2-%{name}} %description -n python2-%{name} The SCGI protocol is a replacement for the Common Gateway Interface (CGI) protocol. It is a standard for applications to interface with HTTP servers. It is similar to FastCGI but is designed to be easier to implement. %endif # with_python2 %prep %autosetup -p1 sed -i '1{s|^#!/usr/bin/env python$||}' scgi/*.py %build %make_build -C apache2 APXS=%{_httpd_apxs} %if 0%{?with_python2} %py2_build %endif # with_python2 %install install -D -m 0755 apache2/.libs/mod_scgi.so %{buildroot}%{_httpd_moddir}/mod_scgi.so install -D -m 644 %{SOURCE1} %{buildroot}%{_httpd_confdir}/scgi.conf %if 0%{?with_python2} %py2_install %endif # with_python2 %check %if 0%{?with_python2} PYTHONPATH=%{buildroot}%{python2_sitearch}/%{name} \ %{__python2} scgi/test_passfd.py %endif # with_python2 %files -n mod_%{name} %license LICENSE.txt %doc CHANGES.txt README.txt doc/* %{_httpd_moddir}/mod_scgi.so %config(noreplace) %{_httpd_confdir}/scgi.conf %if 0%{?with_python2} %files -n python2-%{name} %license LICENSE.txt %doc CHANGES.txt README.txt doc/* scgi/test_passfd.py %{python2_sitearch}/scgi-%{version}-py%{python2_version}.egg-info %{python2_sitearch}/scgi/ %exclude %{python2_sitearch}/scgi/test_passfd.py %exclude %{python2_sitearch}/scgi/test_passfd.py[co] %endif # with_python2 %changelog * Sun Feb 03 2019 Scott K Logan - 1.15-1 - Update to 1.15 - Rename source package from mod_scgi to scgi - Split apache module from Python module * Tue Feb 08 2011 Fedora Release Engineering - 1.13-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 1.13-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Jul 30 2009 Jesse Keating - 1.13-3 - Bump for F12 mass rebuild * Wed Feb 25 2009 Fedora Release Engineering - 1.13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Nov 12 2008 Marek Mahut - 1.13-1 - Initial build