%if 0%{?rhel} && 0%{?rhel} <= 5 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif Name: pypolicyd-spf Version: 1.2 Release: 3%{?dist} Summary: SPF Policy Server for Postfix (Python implementation) License: ASL 2.0 URL: https://launchpad.net/%{name} Source0: https://launchpad.net/%{name}/1.2/%{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 %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 Aug 7 2013 Bojan Smojver 1.2-3 - own the config dir * Wed Aug 7 2013 Bojan Smojver 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 1.2-1 - bump up to 1.2 * Thu May 16 2013 Bojan Smojver 1.1.2-3 - fix changelog * Tue May 14 2013 Bojan Smojver 1.1.2-2 - use macros in URLs * Sun May 12 2013 Bojan Smojver 1.1.2-1 - bump up to 1.1.2 - use version macro in source - require postfix * Fri Mar 15 2013 Bojan Smojver 1.1-1 - initial release