File nagios-plugins-nis.spec of Package nagios-plugins-nis

#
# spec file for package nagios-plugins-nis (Version 1.2)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           nagios-plugins-nis
Summary:        Nagios plugin to check the status of a NIS server on a specified host and NIS domain
Version:        1.2
Release:        1
Url:            http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed/2133.html;d=1
License:        GPL v3 or later
Group:          System/Monitoring
Source0:        check_nis_%version
Requires:       yp-tools
Requires:       licenses
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define		    libexecdir %_prefix/lib/nagios/plugins

%description
Nagios plugin (script) to check the status of a NIS server on a
specified host and NIS domain by asking NIS server for "passwd.byname".

As an additional check, a username may be specified which will then be
"looked up" on the NIS server, note that this is optional and only
introduced in v1.1

Script returns OK if it gets an acceptable answer, CRITICAL if not.

This *nix script has been designed and written for the lowest common
denominator of shells (sh), uses yppoll, ypcat and grep as external
commands.



Authors:
--------
    Paladin

%prep

%build

%install
mkdir -p %buildroot/%libexecdir
sed -e "s|/usr/local/nagios/libexec|%libexecdir|g; \
		s|FLAG_VERBOSE=FALSE|unset LANG;\n\nFLAG_VERBOSE=FALSE|g" %{SOURCE0} > %buildroot/%libexecdir/check_nis
chmod +x %buildroot/%libexecdir/check_nis

%clean
rm -rf %buildroot

%files 
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %_prefix/lib/nagios
%dir %libexecdir
%libexecdir/check_nis

%changelog
* Mon Dec 01 2008 lrupp@suse.de
- update to 1.2: Author added license information
- add licenses package to requires
* Fri Jul 25 2008 lrupp@suse.de
- initial version 1.1
openSUSE Build Service is sponsored by