forked from pool/python-pymilter
Accepting request 633530 from home:Pharaoh_Atem:SUSE_Pagure
- Initial packaging OBS-URL: https://build.opensuse.org/request/show/633530 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymilter?expand=0&rev=1
This commit is contained in:
100
python-pymilter.spec
Normal file
100
python-pymilter.spec
Normal file
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# spec file for package python-pymilter
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# 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-%{**}}
|
||||
Summary: Python interface to sendmail milter API
|
||||
Name: python-pymilter
|
||||
Version: 1.0.2
|
||||
Release: 0
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Libraries/Python
|
||||
URL: http://www.bmsi.com/python/milter.html
|
||||
Source0: https://github.com/sdgathman/pymilter/archive/pymilter-%{version}.tar.gz
|
||||
Source1: tmpfiles-python-pymilter.conf
|
||||
# Backported patch for Python 3
|
||||
Patch0: pymilter-dns_dsn.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: sendmail-devel >= 8.13
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
%if "%{python_flavor}" == "python2"
|
||||
Requires: python2-pydns
|
||||
%endif
|
||||
%if "%{python_flavor}" == "python3"
|
||||
Requires: python3-py3dns
|
||||
%endif
|
||||
# Common subpackage named as such to avoid creating flavor packages
|
||||
Requires: pymilter-common = %{version}-%{release}
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This is a python extension module to enable python scripts to
|
||||
attach to sendmail's libmilter functionality. Additional python
|
||||
modules provide for navigating and modifying MIME parts, sending
|
||||
DSNs, and doing CBV.
|
||||
|
||||
%package -n pymilter-common
|
||||
Summary: Common files for pymilter
|
||||
BuildArch: noarch
|
||||
Requires(post): systemd
|
||||
|
||||
%description -n pymilter-common
|
||||
This package contains the common files used for pymilter.
|
||||
|
||||
%prep
|
||||
%autosetup -n pymilter-pymilter-%{version} -p1
|
||||
|
||||
# Patch from within the source tree (*sigh*)...
|
||||
patch -p1 -b -z .py3 <milter.patch
|
||||
|
||||
%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}/*
|
||||
|
||||
%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
|
Reference in New Issue
Block a user