File monitoring-plugins-shelly.spec of Package monitoring-plugins-shelly

#
# spec file for package monitoring-plugins-shelly
#
# Copyright (c) 2024, Martin Hauke <mardnh@gmx.de>
#
# 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/
#


%define realname check_shelly
Name:           monitoring-plugins-shelly
Version:        0.3
Release:        0
Summary:        A Nagios plugin to monitor Shelly devices
License:        GPL-2.0-or-later
Group:          System/Monitoring
URL:            https://www.claudiokuenzler.com/monitoring-plugins/check_shelly.php
#Git-Clone:     https://github.com/Napsty/check_shelly.git
Source0:        https://github.com/Napsty/check_shelly/archive/refs/tags/%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  nagios-rpm-macros
Requires:       python3-requests
BuildArch:      noarch

%description
This Plugin monitors Shelly devices (power relay/power meter).
Tested on 2nd Gen device (Shelly Pro 4 PM).

%prep
%setup -q -n %{realname}-%{version}
sed -i 's|#!/usr/bin/env python|#!/usr/bin/python3|g' check_shelly.py

%build

%install
install -D -m 0755 check_shelly.py %{buildroot}/%{nagios_plugindir}/check_shelly.py

%files
%doc README.md
%dir %{nagios_libdir}
%dir %{nagios_plugindir}/
%{nagios_plugindir}/check_shelly.py

%changelog
openSUSE Build Service is sponsored by