File python-send_nsca3.spec of Package python-send_nsca3

#
# spec file for package python-send_nsca3
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define skip_python2 1
Name:           python-send_nsca3
Version:        0.1.6.0
Release:        0
Summary:        Python NSCA Client
License:        MIT
URL:            https://github.com/gitmstoute/send_nsca3
Source0:        https://files.pythonhosted.org/packages/source/s/send_nsca3/send_nsca3-%{version}.tar.gz
Source1:        COPYING.LGPL
Patch1:         fix-she-bang.patch
Patch2:         no-randpool.patch
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch:      noarch
Requires:       python-pycryptodome
Requires:       python-six
%python_subpackages

%description
NSCA is the remote passive acceptance daemon used with many Nagios installs. It
ships with a (C-language) executable called `send_nsca` for submitting checks.
This is a mostly-clean re-implementation of `send_nsca` in pure-python. It
supports 10 of the 26 crypto functions used by upstream NSCA, sending to
multiple hosts with one invocation, and timeouts.

%prep
%autosetup -p1 -n send_nsca3-%{version}
cp -a %{S:1} .

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/py_send_nsca3
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative py_send_nsca3

%postun
%python_uninstall_alternative py_send_nsca3

%files %{python_files}
%license COPYING.LGPL
%python_alternative %{_bindir}/py_send_nsca3
%{python_sitelib}/send_nsca3*

%changelog
openSUSE Build Service is sponsored by