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

#
# spec file for package monitoring-plugins-temp
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 pluginname check_temp
Name:           monitoring-plugins-temp
Version:        0.94
Release:        0
Summary:        Check the CPU (or M/B) temperature with lm-sensors
License:        GPL-2.0-or-later
Group:          System/Monitoring
Url:            https://github.com/jackbenny/%{pluginname}
Source0:        https://github.com/jackbenny/%{pluginname}/archive/v%{version}.tar.gz#/%{pluginname}-%{version}.tar.gz
BuildRequires:  nagios-rpm-macros
BuildArch:      noarch
# PATCH-FIX-UPSTREAM add useful performance data for diagrams
Patch:          performance.patch
Requires:       awk
Requires:       bash
Requires:       sed
Requires:       sensors

%description
A small Nagios plugin that checks the CPU (or M/B) temperature with lm-sensors.
It's written in Bash and uses *nix "sensors" and some sed & awk.
Default is to check the CPU temperature but this can be changed to, for example, 
the motherboard temperature with a "--sensor" argument. 
The plugin complies with the guidelines, for example uses -w -c -v arguments 
etc. It also does some basic sanity checks and has an exit 3 catch-all.

%prep
%setup -n %{pluginname}-%{version}
%patch -p1

%build

%install
install -D -m755 %{pluginname}.sh %{buildroot}%{nagios_plugindir}/%{pluginname}

%files
%defattr(-,root,root)
# avoid build dependency of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/%{pluginname}
%doc HISTORY README THANKS

%changelog
openSUSE Build Service is sponsored by