Blob Blame History Raw
Name:           pypolicyd-spf
Version:        1.3.1
Release:        2%{?dist}
Summary:        SPF Policy Server for Postfix (Python implementation)

License:        ASL 2.0
URL:            https://launchpad.net/%{name}
Source0:        https://launchpad.net/%{name}/1.3/%{version}/+download/%{name}-%{version}.tar.gz

BuildArch:      noarch
Requires:       postfix, python-pyspf, python-ipaddr
BuildRequires:  python2-devel

%description
pypolicyd-spf is a Postfix policy engine for Sender Policy Framework (SPF)
checking. It is implemented in pure Python and uses the python-spf (pyspf)
module.

This SPF policy server implementation provides flexible options for different
receiver policies and sender whitelisting to enable it to support a very wide
range of requirements.

%prep
%setup -q


%build
%{__python} setup.py build


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# We want the binary in Postfix libexec directory
%{__mkdir_p} $RPM_BUILD_ROOT%{_libexecdir}/postfix
%{__mv} $RPM_BUILD_ROOT%{_bindir}/policyd-spf $RPM_BUILD_ROOT%{_libexecdir}/postfix
%{__sed} -i -e 's/^HELO_reject = SPF_Not_Pass$/HELO_reject = Fail/' \
               $RPM_BUILD_ROOT%{_sysconfdir}/python-policyd-spf/policyd-spf.conf
 
%files
%doc README README.per_user_whitelisting CHANGES COPYING
%doc policyd-spf.conf.commented
%dir %{_sysconfdir}/python-policyd-spf
%config(noreplace) %{_sysconfdir}/python-policyd-spf/policyd-spf.conf
%{_libexecdir}/postfix/policyd-spf
%{_mandir}/man1/*
%{_mandir}/man5/*
%{python_sitelib}/*


%changelog
* Wed Oct  1 2014 Bojan Smojver <bojan@rexursive.com> 1.3.1-2
- fix bug #1138206

* Fri Sep  5 2014 Bojan Smojver <bojan@rexursive.com> 1.3.1-1
- bump up to 1.3.1

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Aug  7 2013 Bojan Smojver <bojan@rexursive.com> 1.2-3
- own the config dir

* Wed Aug  7 2013 Bojan Smojver <bojan@rexursive.com> 1.2-2
- address issues from package review
- specify python_sitelib only for EL5 or less
- explicitly depend on python2-devel
- remove CFLAGS
- do not specify the whole directory as noreplace, but config file instead

* Tue Aug  6 2013 Bojan Smojver <bojan@rexursive.com> 1.2-1
- bump up to 1.2

* Thu May 16 2013 Bojan Smojver <bojan@rexursive.com> 1.1.2-3
- fix changelog

* Tue May 14 2013 Bojan Smojver <bojan@rexursive.com> 1.1.2-2
- use macros in URLs

* Sun May 12 2013 Bojan Smojver <bojan@rexursive.com> 1.1.2-1
- bump up to 1.1.2
- use version macro in source
- require postfix

* Fri Mar 15 2013 Bojan Smojver <bojan@rexursive.com> 1.1-1
- initial release