File apolicy.spec of Package apolicy

#
# spec file for package perdition
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           apolicy
Summary:        ACL Policy Daemon for Postfix
Version:        0.73
Release:        0
License:        GPLv2+
Group:          Productivity/Networking/Email/Servers
#
Url:            http://www.apolicy.org/cgi-bin/moin.cgi
#Source0:        http://download.gna.org/apolicy/%{name}-%{version}.tar.gz
Source0:        %{name}-%{version}.tar.bz2
Source1:        doc.tar.bz2
#
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-IPy
BuildRequires:  python-devel
BuildRequires:  python-pydns
BuildRequires:  python-pyspf
Requires:       python-IPy
Requires:       python-pydns
Requires:       python-pyspf
%py_requires

%description
ACL Policy Daemon is a program that communicates with the Postfix MTA using the
Policy Delegation Protocol implementing an ACL (Access Control List) system,
making very easy to improve and create nice controls on your e-mail traffic.
You can use it to verify SPF records to.

The logic behind apolicy is simple, you define some rules, then you combine
them, if all of them matches, apolicy will send an action for that combination,
defined by you to. Take a look on what you can apply rules using apolicy's
ACLs. Some of them you already can do with Postfix, but they are sequential. In
pure Postfix you can not combine rules.

It is developed using Python and has no other dependencies and licensed by GPL
version 2.

%prep
%setup -a 1
%{__perl} -p -i -e 's|\r\n|\n|' docs/*.txt

%build
CFLAGS="%{optflags}" \
python setup.py build

%install
python setup.py install --prefix %{_prefix} --root %{buildroot} --record-rpm %{name}.files
# rpmlint: non-conffile-in-etc
%{__sed} -i -e 's,\(^/etc.*conf\),%config(noreplace) \1,' %{_builddir}/%{name}-%{version}/%{name}.files 
#%__install -D -m 0755 src/apolicy.py %{buildroot}%{_sbindir}/apolicy
#%__install -d -m 0755 %{buildroot}%{_prefix}/lib/postfix/
#%__ln_s -f %{_sbindir}/apolicy %{buildroot}%{_prefix}/lib/postfix/apolicy

%clean
%{__rm} -rf %{buildroot};

%files -f %{name}.files
%defattr(644,root,root,755)
%doc docs *.TXT *.conf %{name}.init

%changelog
openSUSE Build Service is sponsored by