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

#
# spec file for package monitoring-plugins-buildservice
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


Name:           monitoring-plugins-buildservice
Version:        0.003
Release:        0
Summary:        Nagios Checks for OpenBuildService
License:        GPL-2.0+ or Artistic-1.0
Group:          System/Monitoring
Source0:        check_buildservice_status.pl
Source1:        check_bs_crit.pl
Source2:        check_buildservice_status.cfg
Source3:        check_bs_crit.cfg

BuildRequires:  nagios-rpm-macros
%if 0%{?suse_version}
# nagios can execute the script with embedded perl
Recommends:     perl
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This script attempts to check if all buildservice schedulers are up.

%prep

%build

%install
install -D -m755 %{SOURCE0} %{buildroot}%{nagios_plugindir}/check_buildservice_status.pl
install -D -m755 %{SOURCE1} %{buildroot}%{nagios_plugindir}/check_bs_crit.pl
install -D -m644 %{SOURCE2} %{buildroot}%{nrpe_sysconfdir}/check_buildservice_status.cfg
install -D -m644 %{SOURCE3} %{buildroot}%{nrpe_sysconfdir}/check_bs_crit.cfg

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{nrpe_sysconfdir}
%{nagios_plugindir}/check_buildservice_status.pl
%{nagios_plugindir}/check_bs_crit.pl
%config(noreplace) %{nrpe_sysconfdir}/check_buildservice_status.cfg
%config(noreplace) %{nrpe_sysconfdir}/check_bs_crit.cfg


%changelog