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

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

Name:           monitoring-plugins-diskio
Version:        3.2.8
Release:        0
%define         realname check_diskio
Summary:        Monitor the amount of disk I/O
License:        GPL-3.0+
Group:          System/Monitoring
Source0:        %{realname}-%{version}.tar.gz
# try to always build-require the "right" perl version
%define         perl_arch perl(POSIX)
%if 0%{?suse_version} == 1220
%ifarch x86_64
%define         perl_arch perl-base
BuildRequires:  %perl_arch
BuildRequires:  nagios-rpm-macros
BuildRequires:  perl(Module::Install)
Provides:       nagios-plugins-diskio = %{version}-%{release}
Obsoletes:      nagios-plugins-diskio < %{version}-%{release}
Requires:       %perl_arch
Requires:       perl(Array::Unique)
Requires:       perl(English)
Requires:       perl(File::Slurp)
Requires:       perl(List::MoreUtils)
Requires:       perl(Nagios::Plugin)
Requires:       perl(Nagios::Plugin::Getopt)
Requires:       perl(Nagios::Plugin::Threshold)
Requires:       perl(Number::Format)
Requires:       perl(Readonly)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

check_diskio is a Nagios plugin to monitor the amount of disk I/O in sectors
on Linux 2.6 and 2.4 systems

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

perl Makefile.PL INSTALLDIRS=vendor \
    INSTALLSCRIPT=%{nagios_plugindir} \
make %{?_smp_mflags}

make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name "*.pod" -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

rm -rf %{buildroot}

%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by