File monitoring-plugins-cisco_nexus.spec of Package monitoring-plugins-cisco_nexus
#
# spec file for package monitoring-plugins-cisco_nexus
#
# 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 http://bugs.opensuse.org/
#
Name: monitoring-plugins-cisco_nexus
Summary: Monitor Cisco datacenter switch (CPU, memory and sensors)
License: GPL-2.0+
Group: System/Monitoring
Version: 20180919
Release: 100
Url: https://github.com/david-barbion/monitoring
Source0: https://github.com/david-barbion/monitoring/archive/master.zip
Requires: perl(Switch)
Requires: perl(List::Util)
Requires: perl(Net::SNMP)
Requires: perl(FindBin)
Requires: perl(Nagios::Plugin)
Requires: perl(Data::Dumper)
BuildArch: noarch
BuildRequires: unzip
BuildRequires: nagios-rpm-macros
Provides: nagios-plugins-cisco_nexus = %{version}-%{release}
Obsoletes: nagios-plugins-cisco_nexus < %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A part of the monitoring plug-ins for Nagios, Shinken, Icinga (and other
compatible monitoring solutions) from David Barbion.
%prep
%setup -q -n monitoring-master
%build
%install
mkdir -p %buildroot/%{nagios_plugindir}/
for file in check_cisco_nexus/*.pl; do
sed -e "s|/usr/local/nagios/libexec|%{nagios_plugindir}|g" \
$file > %buildroot/%{nagios_plugindir}/$(basename $file)
done
chmod +x %buildroot/%{nagios_plugindir}/*
%clean
rm -rf %buildroot
%files
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/*
%changelog