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

# spec file for package monitoring-plugins-openmanage
# Copyright (c) 2014 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

# Definitions used throughout the spec file
%define         plugin check_openmanage

Name:           monitoring-plugins-openmanage
Version:        3.7.12
%if 0%{?suse_version}
Release:        100
Recommends:     pnp4nagios
Group:          System/Monitoring
BuildRequires:  monitoring-plugins-common
Requires:       monitoring-plugins-common
Release:        100
Group:          Applications/System
BuildRequires:  nagios-plugins
Requires:       nagios-plugins
Summary:        Plugin to monitor hardware health on Dell servers

License:        GPL-3.0+
Url:  {plugin}.html

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

BuildRequires:  nagios-rpm-macros

Requires:       perl(Config::Tiny)
Requires:       perl(Crypt::Rijndael)
Requires:       perl(Net::SNMP)

Provides:       nagios-plugins-check-openmanage = %{version}
Obsoletes:      nagios-plugins-check-openmanage < 3.7.2-3
Provides:       nagios-plugins-openmanage = %{version}-%{release}
Obsoletes:      nagios-plugins-openmanage < 3.7.10

check_openmanage is a plugin for Nagios which checks the hardware
health of Dell servers running OpenManage Server Administrator
(OMSA). The plugin can be used remotely with SNMP or locally with
NRPE, check_by_ssh or similar, whichever suits your needs and
particular taste. The plugin checks the health of the storage
subsystem, power supplies, memory modules, temperature probes etc.,
and gives an alert if any of the components are faulty or operate
outside normal parameters.

%setup -q -n %{plugin}-%{version}


install -Dp -m 0755 %{plugin} %{buildroot}%{nagios_plugindir}/%{plugin}
install -Dp -m 0644 man/%{plugin}.8 %{buildroot}%{_mandir}/man8/%{plugin}.8
install -Dp -m 0644 man/%{plugin}.conf.5 %{buildroot}%{_mandir}/man5/%{plugin}.conf.5
install -Dp -m 0644 example.conf %{buildroot}%{nagios_sysconfdir}/%{plugin}.conf
# install the pnp template 
install -Dp -m 0644 check_openmanage.php %{buildroot}%{pnp4nagios_templatedir}.special/check_openmanage.php

rm -rf %{buildroot}

%defattr(-, root, root, -)
%dir %{pnp4nagios_datadir}
%dir %{pnp4nagios_templatedir}.special
%dir %{nagios_sysconfdir}
%config(noreplace) %{nagios_sysconfdir}/*