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

#
# spec file for package monitoring-plugins-tw_cli
#
# 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-tw_cli
Summary:        Reporting the RAID status of 3ware raids
Version:        0.3.1
Release:        100
Url:            http://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Devices/RAID-Controller/check_tw_cli
License:        BSD-4-Clause
Group:          System/Monitoring
Source0:        check_tw_cli.pl
Patch1:         check_tw_cli.patch
%if 0%{?suse_version} > 1020
# nagios can execute the script with embedded perl
Recommends:     perl
%else
Requires:       perl
%endif
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-tw_cli = %{version}-%{release}
Obsoletes:      nagios-plugins-tw_cli < %{version}-%{release}
Requires:       tw_cli
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
check_tw_cli reports the raidstatus of 3ware raids based on the results of
tw_cli. It was basicly tested with the newer tw_cli tool from the 9.2.x code
set which supports sysfs.

IMHO this plugin should work with older tw_cli version, too. Feedback is very
welcome! Testhardware is limited here, so I'm instructed by your feedback.


%prep
%setup -q -T -c %{name}
install -m644 %{SOURCE0} .
%patch1 -p0

%build

%install
install -D -m755 check_tw_cli.pl %{buildroot}/%{nagios_plugindir}/check_tw_cli

%clean
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_tw_cli

%changelog
openSUSE Build Service is sponsored by