Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           python-pyspf
Version:        2.0.3
Release:        1%{?dist}
Summary:        Python module and programs for SPF (Sender Policy Framework)

Group:          Development/Languages
License:        Python Software Foundation License
URL:            http://sourceforge.net/forum/forum.php?forum_id=596908
Source0:        http://easynews.dl.sourceforge.net/sourceforge/pymilter/pyspf-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-setuptools
BuildRequires:  python-devel
Requires:       python-pydns

%description
SPF does email sender validation.  For more information about SPF,
please see http://spf.pobox.com.

This SPF client is intended to be installed on the border MTA, checking
if incoming SMTP clients are permitted to forward mail.  The SPF check
should be done during the MAIL FROM:<...> command.

%define namewithoutpythonprefix %(echo %{name} | sed 's/^python-//')
%prep
%setup -q -n %{namewithoutpythonprefix}-%{version}


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT/usr/bin/type99.py $RPM_BUILD_ROOT/usr/bin/type99
mv $RPM_BUILD_ROOT/usr/bin/spfquery.py $RPM_BUILD_ROOT/usr/bin/spfquery
rm -f $RPM_BUILD_ROOT/usr/bin/*.py{o,c}
sed -i -e 's|^#!/usr/bin/env python$||' $RPM_BUILD_ROOT/%{python_sitelib}/spf.py


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CHANGELOG PKG-INFO README
%{python_sitelib}/spf.py*
/usr/bin/type99
/usr/bin/spfquery

%changelog
* Sat Jun 09 2007 Sean Reifschneider <jafo@tummy.com> 2.0.3-1
- Upgrading to 2.0.3 release.

* Thu Dec 21 2006 Kevin Fenzi <kevin@tummy.com> 1.7-6
- Rebuild for python 2.5

* Thu Aug 31 2006 Sean Reifschneider <jafo@tummy.com> 1.7-5
- Changing SPEC file where it strips out the shebang line.

* Thu Aug 31 2006 Sean Reifschneider <jafo@tummy.com> 1.7-4
- Adding -2 .spec file changelog entry.

* Wed Aug 30 2006 Sean Reifschneider <jafo@tummy.com> 1.7-3
- Changes based on review from Kevin Fenzi.

* Wed Aug 30 2006 Sean Reifschneider <jafo@tummy.com> 1.7-3
- Changes based on review from Kevin Fenzi.

* Tue Aug 29 2006 Sean Reifschneider <jafo@tummy.com> 1.7-1
- Initial RPM spec file.