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

#
# spec file for package monitoring-plugins-apache
#
# Copyright (c) 2013-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-apache
%define         base_name check_apachestatus
Version:        1.4
Release:        0
Summary:        Check apache status plugin for Nagios
License:        GPL-2.0+
Group:          System/Monitoring
Url:            http://exchange.nagios.org/directory/Plugins/Web-Servers/Apache/check_apachestatus-with-performance-data/details
Source0:        %{base_name}.pl
# PATCH-FIX-UPSTREAM drop brackets (issues in icinga diagrams) from log information
Patch1:         2025-04-30_drop_brackets.patch
Requires:       perl
BuildRequires:  apache2
BuildRequires:  nagios-rpm-macros
BuildRequires:  perl
Provides:       nagios-plugins-apache = %{version}-%{release}
Obsoletes:      nagios-plugins-apache < %{version}-%{release}
Requires:       apache2
Requires:       perl(LWP::UserAgent)
Requires:       perl(utils)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Enhanced version of Lieven De Bodt's check_apachestatus.pl that
produces correct performance data for PNP. Requests/sec, kB/sec
and kB/Request were added to the output.

%prep
cp %{SOURCE0} .
%patch -p0 -P1

%build

%install
install -d -m755 %{buildroot}/%{nagios_plugindir}
install -m755 %{base_name}.pl %{buildroot}/%{nagios_plugindir}/%{base_name}.pl
ln -s %{base_name}.pl %{buildroot}/%{nagios_plugindir}/%{base_name}

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

%changelog
openSUSE Build Service is sponsored by