File python-scgi.spec of Package python-scgi
#
# spec file for package python-scgi
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-scgi
Version: 1.14
Release: 0
#
#
BuildRequires: apache2-devel
BuildRequires: pcre-devel
BuildRequires: python-devel
%define apxs /usr/sbin/apxs2
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
%define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.mems-exchange.org/software/scgi/
# repacked from http://quixote.python.ca/releases/scgi-%{version}.tar.gz
#
Source: http://python.ca/scgi/releases/scgi-%{version}.tar.gz
Patch0: python-scgi-newstyle-classes.patch
Patch1: python-scgi-1.13_documentation_path.patch
Patch2: python-scgi-apache24.patch
#
Summary: Python implementation of the SCGI protocol
License: SUSE-Python-1.6
Group: Development/Libraries/Python
%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.
This package contains the python bindings.
%package -n apache2-mod_scgi
Requires: %{apache_mmn}
Requires: apache2
#
Summary: Apache module named mod_scgi that implements the client side of the protocol
Group: Development/Libraries/Python
%description -n apache2-mod_scgi
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.
This package contains the apache2 module.
To load mod_python into Apache, run the command "a2enmod scgi" as root.
%prep
%setup -n scgi-%{version}
%patch0 -p1
%patch1
%patch2 -p1
%build
CFLAGS="%{optflags}" \
%{__python} setup.py build
pushd apache2
%{apxs} -c mod_scgi.c
popd
%install
%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot} --record-rpm %{name}.files
%{__install} -D -m 0755 apache2/.libs/mod_scgi.so %{buildroot}%{apache_libexecdir}/mod_scgi.so
%{__cp} apache2/README.txt README.apache2.txt
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root)
%doc README.txt cgi2scgi.c CHANGES.txt LICENSE.txt doc/guide.html cgi2scgi.c
%files -n apache2-mod_scgi
%defattr(-,root,root)
%{apache_libexecdir}/mod_scgi.so
%doc README.txt CHANGES.txt LICENSE.txt README.apache2.txt doc/guide.html
%changelog