2018-09-06 09:03:37 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pymilter
|
|
|
|
#
|
2021-02-12 13:43:21 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-09-06 09:03:37 +00:00
|
|
|
# Copyright (c) 2018 Neal Gompa <ngompa13@gmail.com>.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-04-25 12:47:34 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-09-06 09:03:37 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
# we don't want to provide private python extension libs
|
|
|
|
%global __provides_exclude_from ^(%{python2_sitearch}/.*\\.so|%{python3_sitearch}/.*\\.so)$
|
|
|
|
# Python 2 module isn't building properly and we don't really need it right now anyway...
|
|
|
|
%global skip_python2 1
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pymilter
|
2019-04-25 12:47:34 +00:00
|
|
|
Version: 1.0.4
|
2018-09-06 09:03:37 +00:00
|
|
|
Release: 0
|
2019-12-11 08:20:56 +00:00
|
|
|
Summary: Python interface to the sendmail milter API
|
|
|
|
License: GPL-2.0-or-later
|
2018-09-06 09:03:37 +00:00
|
|
|
URL: http://www.bmsi.com/python/milter.html
|
|
|
|
Source0: https://github.com/sdgathman/pymilter/archive/pymilter-%{version}.tar.gz
|
|
|
|
Source1: tmpfiles-python-pymilter.conf
|
2018-09-06 16:41:42 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2019-04-25 12:47:34 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-12-11 08:20:56 +00:00
|
|
|
BuildRequires: %{pythons}
|
2018-09-06 09:03:37 +00:00
|
|
|
BuildRequires: fdupes
|
2018-09-06 16:41:42 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-09-06 09:03:37 +00:00
|
|
|
BuildRequires: sendmail-devel >= 8.13
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2019-12-11 08:20:56 +00:00
|
|
|
# Common subpackage named as such to avoid creating flavor packages
|
|
|
|
Requires: pymilter-common = %{version}-%{release}
|
|
|
|
Requires: python
|
2021-02-13 00:04:57 +00:00
|
|
|
Requires: python-py3dns
|
2018-09-06 09:03:37 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2018-09-06 16:41:42 +00:00
|
|
|
This is a Python extension module to enable python scripts to attach to
|
|
|
|
sendmail's libmilter functionality. Additional Python modules provide for
|
|
|
|
navigation and modification of MIME parts, sending DSNs, and doing CBV.
|
2018-09-06 09:03:37 +00:00
|
|
|
|
|
|
|
%package -n pymilter-common
|
|
|
|
Summary: Common files for pymilter
|
|
|
|
Requires(post): systemd
|
2019-12-11 08:20:56 +00:00
|
|
|
BuildArch: noarch
|
2018-09-06 09:03:37 +00:00
|
|
|
|
|
|
|
%description -n pymilter-common
|
|
|
|
This package contains the common files used for pymilter.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n pymilter-pymilter-%{version} -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/log/milter
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/milter
|
|
|
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
|
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
|
|
|
%fdupes %{buildroot}%{python_sitearch}/*
|
|
|
|
|
2019-04-25 12:47:34 +00:00
|
|
|
%check
|
2019-12-11 08:20:56 +00:00
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m unittest discover -v
|
2019-04-25 12:47:34 +00:00
|
|
|
|
2018-09-06 09:03:37 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README ChangeLog NEWS TODO CREDITS sample.py milter-template.py
|
|
|
|
%license COPYING
|
|
|
|
%{python_sitearch}/*
|
|
|
|
|
|
|
|
%files -n pymilter-common
|
|
|
|
%license COPYING
|
|
|
|
%{_libexecdir}/milter
|
|
|
|
%dir %attr(0755,mail,mail) %{_localstatedir}/log/milter
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
|
|
|
%post -n pymilter-common
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
|
|
|
%changelog
|