File nagios-plugins-hpasm.spec of Package nagios-plugins-hpasm
#
# spec file for package nagios-plugins-hpasm
#
# Copyright (c) 2009-2012 SUSE LINUX Products 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/
#
Name: nagios-plugins-hpasm
Version: 4.6.3
Release: 1
License: GPL-2.0+
%define realname check_hpasm
Summary: Checks hardware health of Hewlett-Packard Proliant Servers
Url: http://labs.consol.de/nagios/check_hpasm/
Group: System/Monitoring
Source0: %{realname}-%{version}.tar.bz2
# for directory ownership:check_hpasm-4.2.tar.gz
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)
%if 0%{?suse_version}
Recommends: hpasm
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if %{undefined make_install}
%define make_install make install DESTDIR=%{?buildroot}
%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}
%build
%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
mkdir -p %{buildroot}/%{nagios_libdir}
mkdir -p %{buildroot}/%{nagios_plugindir}
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
%make_install
install -m644 AUTHORS ChangeLog COPYING README TODO %{buildroot}/%{_defaultdocdir}/%{name}/
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%attr (755,root,root) %{nagios_plugindir}/check_hpasm
%changelog