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

#
# spec file for package monitoring-plugins-rbl
#
# Copyright (c) 2014-2021 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/
#


%define         realname check_rbl
Name:           monitoring-plugins-rbl
Version:        1.6.2
Release:        0
Summary:        Check if an SMTP server is blacklisted
License:        GPL-3.0-or-later
Group:          System/Monitoring
URL:            https://github.com/matteocorti/check_rbl
Source0:        https://github.com/matteocorti/check_rbl/archive/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  nagios-rpm-macros
BuildRequires:  perl(Module::Install)
Requires:       perl(Data::Validate::Domain)
Requires:       perl(Data::Validate::IP)
Requires:       perl(IO::Select)
Requires:       perl(Net::DNS)
Requires:       perl(Net::IP)
Requires:       perl(Readonly)
Requires:       perl(Monitoring::Plugin)
Requires:       perl(Monitoring::Plugin::Getopt)
Requires:       perl(Monitoring::Plugin::Threshold)
Provides:       nagios-plugins-rbl = %{version}-%{release}
Obsoletes:      nagios-plugins-rbl < %{version}-%{release}
BuildArch:      noarch

%description
This plugin for Nagios will check wether the specified server is in any of the
numerous anti-spam blocklists.

%prep
%setup -q -n %{realname}-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor \
    INSTALLSCRIPT=%{nagios_plugindir} \
    INSTALLVENDORSCRIPT=%{nagios_plugindir}
make %{?_smp_mflags}

%install
install -d %{buildroot}/%{nagios_plugindir}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name "*.pod" -exec rm -f {} \;
install -D -m 0644 check_rbl.ini %{buildroot}/%{_sysconfdir}/check_rbl.ini

%files
%license COPYING COPYRIGHT
%doc AUTHORS Changes NEWS README.md TODO
%config %{_sysconfdir}/check_rbl.ini
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_rbl
%{_mandir}/man1/check_rbl.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by