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

# spec file for package monitoring-plugins-apcupsd
# 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

Name:           monitoring-plugins-apcupsd
Version:        1.3
Release:        0
Summary:        Monitoring plugin for APC Smart-UPSes using apcupsd
License:        BSD-3-Clause
Group:          System/Monitoring
Source0:        check_apcupsd
Patch1:         monitoring-plugins-apcupsd-power_status.patch
BuildRequires:  nagios-rpm-macros
Requires:       apcupsd
Requires:       bash
Requires:       grep
Provides:       nagios-plugins-apcupsd = %{version}-%{release}
Obsoletes:      nagios-plugins-apcupsd < %{version}-%{release}
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Nagios plugin to monitor APC Smart-UPSes using apcupsd.

%setup -q -T -c %{name}
install -m755 %{SOURCE0} .
%patch1 -p1

install -D -m755 check_apcupsd %{buildroot}/%{nagios_plugindir}/check_apcupsd

# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}