File monitoring-plugins-mqtt.spec of Package monitoring-plugins-mqtt
#
# spec file for package monitoring-plugins-mqtt
#
# Copyright (c) 2020, 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_mqtt
Name: monitoring-plugins-mqtt
Version: 3.0
Release: 0
Summary: A Nagios/Icinga plugin for checking connectivity to an MQTT broker
License: BSD-3-Clause
Group: System/Monitoring
URL: https://github.com/jpmens/check-mqtt
Source: https://github.com/jpmens/check-mqtt/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: nagios-rpm-macros
Requires: python3-paho-mqtt
Recommends: python3-jsonpath-rw
BuildArch: noarch
%description
A Nagios/Icinga plugin for checking connectivity to an MQTT broker.
Or with --readonly monitor an mqtt application. Or for checking the
status of MQTT clients maintaining the status on an MQTT broker.
%prep
%setup -q -n check-mqtt-%{version}
sed -i 's|#!/usr/bin/env python3|#!/usr/bin/python3|g' check-mqtt.py
%build
%install
install -D -m755 check-mqtt.py %{buildroot}/%{nagios_plugindir}/check_mqtt
%files
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_mqtt
%changelog