File apache2-mod_wsgi.spec of Package apache2-mod_wsgi.openSUSE_13.1_Update
#
# spec file for package apache2-mod_wsgi
#
# Copyright (c) 2014 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: apache2-mod_wsgi
Version: 3.4
Release: 0
Summary: Python WSGI adapter module for Apache
License: Apache-2.0
Group: Productivity/Networking/Web/Servers
Url: http://code.google.com/p/modwsgi/
Source: http://modwsgi.googlecode.com/files/mod_wsgi-%{version}.tar.gz
Patch1: mod_wsgi-3.4-connsbh.patch
Patch2: mod_wsgi-setuid-patch.diff
Patch3: mod_wsgi-3.4-fix-off-by-one.diff
%define tarname mod_wsgi
%define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+")
%if "%{apache_branch}" == "2.4"
%define apxs %{_bindir}/apxs2
%else
%define apxs %{_sbindir}/apxs2
%endif
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
BuildRequires: apache2-devel
BuildRequires: python-devel
Requires: apache2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The aim of mod_wsgi is to implement a simple to use Apache module which can
host any Python application which supports the Python WSGI interface.
%prep
%setup -n %{tarname}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%configure \
--with-apxs="%{apxs}-prefork" \
--with-python="python"
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/%{apache_libexecdir}
cp -p .libs/mod_wsgi.so %{buildroot}/%{apache_libexecdir}
%files
%defattr(-,root,root)
%doc LICENCE README
%dir %{apache_libexecdir}
%{apache_libexecdir}/mod_wsgi.so
%changelog