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

#
# spec file for package monitoring-plugins-hpasm
#
# Copyright (c) 2015-2016 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 http://bugs.opensuse.org/
#


%if %{undefined make_install}
%define  make_install make install DESTDIR=%{?buildroot}
%endif

%define         realname check_hpasm
Name:           monitoring-plugins-hpasm
Version:        4.8
Release:        0
Summary:        Checks hardware health of Hewlett-Packard Proliant Servers
License:        GPL-2.0-or-later
Group:          System/Monitoring
URL:            http://labs.consol.de/nagios/check_hpasm/
#Git-Clone:     https://github.com/lausser/check_hpasm.git
Source0:        https://labs.consol.de/assets/downloads/nagios/%{realname}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  nagios-rpm-macros
Requires:       net-snmp
Requires:       perl
Requires:       perl(Data::Dumper)
Requires:       perl(File::Basename)
Requires:       perl(Getopt::Long)
Requires:       perl(Nagios::Plugin)
Requires:       perl(Net::SNMP)
Requires:       perl(SNMP)
Provides:       nagios-plugins-hpasm = %{version}-%{release}
Obsoletes:      nagios-plugins-hpasm < %{version}-%{release}
BuildArch:      noarch
%if 0%{?suse_version}
Recommends:     hpasm
%endif

%description
check_hpasm is a plugin for Nagios which checks the hardware health of
Hewlett-Packard Proliant Servers. To accomplish this, you must have installed
the hpasm package. The plugin checks the health of

    * Processors
    * Power supplies
    * Memory modules
    * Fans
    * CPU- and board-temperatures
    * Raids (ide and sas only when using SNMP)

and alerts you if one of these components is faulty or operates outside its
normal parameters.

%prep
%setup -q -n %{realname}-%{version}
# fix spurious exec permissions
chmod -x AUTHORS ChangeLog COPYING README TODO

%build
autoreconf -fi
%configure \
           --enable-perfdata \
           --enable-hpacucli \
           --enable-extendedinfo \
           --with-nagios-user=%{nagios_user} \
           --with-nagios-group=%{nagios_group} \
           --with-degrees='celsius' \
           --with-perl=%{_bindir}/perl \
           --with-noinst-level='unknown' \
           --libexecdir=%{nagios_plugindir}

make %{?_smp_mflags}

%install
%make_install

%files
%license COPYING
%doc AUTHORS ChangeLog README TODO
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_hpasm

%changelog