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

#
# spec file for package monitoring-plugins-obs_scheduler
#
# Copyright (c) 2019 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-obs_scheduler
Version:        0.0.1
Release:        0
Summary:        Monitor OBS scheduler status
License:        MIT
Group:          System/Monitoring
Url:            https://openbuildservice.org/
Source:         check_obs_scheduler
BuildRequires:  nagios-rpm-macros
BuildRequires:  monitoring-plugins-common
Requires:       perl(Getopt::Long)
Requires:       perl(Data::Dumper)
Requires:       perl(XML::Structured)
#Requires:       perl(BSConfiguration)
#Requires:       perl(BSXML)
#Requires:       perl(BSUtil)
Requires:       perl(Carp)
Requires:       obs-server
Recommends:     monitoring-plugins-common
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This plugin checks the schedulers of the Open Build Service for high 
medium and low priority events. This should give a good overview of 
the current "load" of the who build system. 

%prep

%build

%install
install -D -m755 %{SOURCE0} %buildroot/%{nagios_plugindir}/check_obs_scheduler
# avoid env interpreter dependency - use the full path to perl interpreter
sed -i "s|/usr/bin/env perl|%{_bindir}/perl|g" %buildroot/%{nagios_plugindir}/check_obs_scheduler
mkdir -p  %buildroot/%{plugin_confdir}
echo "This file is optionally used by package: %{name}" > %buildroot/%{plugin_confdir}/check_obs_scheduler.yml

%files
%defattr(-,root,root)
%dir %{plugin_confdir}
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_obs_scheduler
%config(noreplace) %{plugin_confdir}/check_obs_scheduler.yml

%changelog
openSUSE Build Service is sponsored by