%define httpd apache2
Summary: A WSGI interface for Python web applications in Apache
Summary(ja): Pythonウェブアプリケーション用WSGIインタフェースを実装したApacheモジュール
Name: mod_wsgi
Version: 3.3
Release: 1%{?_dist_release}
License: Apache License Version 2.0
Group: System Environment/Daemons
URL: http://code.google.com/p/modwsgi/
Source: http://modwsgi.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: wsgi.conf
BuildRequires: python-devel
BuildRequires: %{httpd}-devel
Requires: %{httpd}
Requires: python >= 2.3
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Vendor: Project Vine
Distribution: Vine Linux

%description
The mod_wsgi adapter is an Apache module that provides a WSGI compliant
interface for hosting Python based web applications within Apache. The
adapter is written completely in C code against the Apache C runtime and
for hosting WSGI applications within Apache has a lower overhead than using
existing WSGI adapters for mod_python or CGI.


%prep
%setup -q


%build
%configure --enable-shared
make %{?_smp_mflags} LDFLAGS="-L%{_libdir}"


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

## Install the config file
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{httpd}/conf.d
install -p -m 644 %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/%{httpd}/conf.d/


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc LICENCE README
%config(noreplace) %{_sysconfdir}/%{httpd}/conf.d/wsgi.conf
%{_libdir}/%{httpd}/modules/%{name}.so


%changelog
* Wed Dec 01 2010 Shu KONNO <owa@bg.wakwak.com> 3.3-1
- initial build for Vine Linux
- added wsgi.conf from fedora