File monitoring-plugins-diskio.spec of Package monitoring-plugins-diskio
#
# spec file for package monitoring-plugins-diskio
#
# Copyright (c) 2013 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-diskio
Version: 3.2.4
Release: 1
License: GPL-3.0+
%define realname check_diskio
Summary: Monitor the amount of disk I/O
Url: https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_diskio
Group: System/Monitoring
Source0: https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{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
%endif
%endif
BuildRequires: %perl_arch
BuildRequires: nagios-rpm-macros
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
%description
check_diskio is a Nagios plugin to monitor the amount of disk I/O in sectors
on Linux 2.6 and 2.4 systems
%prep
%setup -q -n %{realname}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor \
INSTALLSCRIPT=%{nagios_plugindir} \
INSTALLVENDORSCRIPT=%{nagios_plugindir}
make %{?_smp_mflags}
%install
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 \;
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS Changes COPYING COPYRIGHT NEWS README TODO
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_diskio
%{_mandir}/man1/check_diskio.1*
%changelog