# -*-rpm-spec-*-

%define modulename mod_python

Name: apache2-%modulename
Version: 3.1.4
Release: alt0.1

Summary: Python module for Apache2 Server
License: Apache Software License
Group: System/Servers
Url: http://www.modpython.org

Source0: %modulename-%version.tgz

PreReq: apache2 >= %apache_version
BuildPreReq: apache2-devel >= %apache_version
PreReq: python >= %__python_version
BuildPreReq: rpm-build-python >= 0.21-alt1
BuildPreReq: python-devel = %__python_version
Requires: python = %__python_version
Provides: mod_python%__python_version

# Automatically added by buildreq on Wed Apr 13 2005
BuildRequires: apache2-devel hostinfo libapr-devel libaprutil-devel python-base python-dev python-modules-encodings

%add_python_req_skip _apache

%description
Python module for Apache2 Server.

%prep
%setup -q -n %modulename-%version

%build
%configure --with-apxs=%apache_apxs
%make

%install
%make DESTDIR=%buildroot install

### Creating %modulename.conf
%__cat <<EOF >%modulename.conf
### %modulename.conf - configuration directives for the Python Apache2 module.

# LoadModule python_module      modules/mod_python.so
EOF

%__mkdir_p %buildroot%apache_addonconfdir
%__install -m 0644 %modulename.conf %buildroot%apache_addonconfdir

%post
[ -x %apache_ctl ] && %apache_ctl update ||:

%postun
[ -x %apache_ctl ] && %apache_ctl update ||:

%files 
%python_sitelibdir/%modulename
%apache_moduledir/%modulename.so
%config(noreplace) %apache_addonconfdir/%modulename.conf

%changelog
* Wed Apr 13 2005 Vitaly A. Ostanin <vyt@altlinux.ru> 3.1.4-alt0.1
- First build for Sisyphus based on spec from Sisyphus mod_python
