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.5
Release:        4%{?dist}
Summary:        Python module and programs for SPF (Sender Policy Framework)

Group:          Development/Languages
License:        Python
URL:            http://sourceforge.net/forum/forum.php?forum_id=596908
Source0:        http://downloads.sourceforge.net/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%{_bindir}/type99.py $RPM_BUILD_ROOT%{_bindir}/type99
mv $RPM_BUILD_ROOT%{_bindir}/spfquery.py $RPM_BUILD_ROOT%{_bindir}/spfquery
rm -f $RPM_BUILD_ROOT%{_bindir}/*.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
%{_bindir}/type99
%{_bindir}/spfquery
%{python_sitelib}/spf.py*
%{python_sitelib}/pyspf-%{version}-py*.egg-info

%changelog
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.5-2
- Rebuild for Python 2.6

* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.5-1
- update to 2.0.5
- fix license tag

* 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.