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

#
# spec file for package monitoring-plugins-ps
#
# 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-ps
Version:        1.0
Release:        100
License:        GPL-2.0+
Summary:        Check a specific process and its cpu/memory utilization
Url:            http://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/check_ps-sh
Group:          System/Monitoring
Source0:        check_ps.sh
Source1:        check_ps.php
Source2:        LICENSE
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-ps = %{version}-%{release}
Obsoletes:      nagios-plugins-ps < %{version}-%{release}
Recommends:     pnp4nagios
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
check_ps.sh is a Nagios plugin to check a specific process via ps.
You may provide any string as an argument to match a specific
process. Please note that the output could be distorted if the
argument matches various processes, so please make sure to use
unique strings to match a process.

%prep

%build

%install
install -D -m755 %{SOURCE0} %{buildroot}/%{nagios_plugindir}/check_ps.sh
install -D -m644 %{SOURCE1} %{buildroot}/%{pnp4nagios_templatedir}/check_ps.php
install -D -m644 %{SOURCE2} %{buildroot}/%{_defaultdocdir}/%{name}/LICENSE

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
# avoid build dependecy of nagios - own the dirs
%dir %{_prefix}/lib/nagios
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_ps.sh
%dir %{pnp4nagios_datadir}
%dir %{pnp4nagios_templatedir}
%{pnp4nagios_templatedir}/check_ps.php

%changelog