3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
6 %define plugin check_rbl
7 Summary: check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
8 Name: nagios-plugin-%{plugin}
13 Source0: https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{plugin}-%{version}.tar.gz
14 # Source0-md5: 724cd353d48df3f4e9a98743146cfd0f
15 Source1: %{plugin}.cfg
16 Source2: %{plugin}.ini
17 Patch0: verbose-reporting.patch
18 URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
19 BuildRequires: sed >= 4.0
20 Requires: nagios-common
22 BuildRequires: perl-Nagios-Plugin
23 BuildRequires: perl-Net-DNS
24 BuildRequires: perl-Parallel-Iterator
25 BuildRequires: perl-Readonly
27 BuildRequires: rpm-perlprov >= 4.1-13
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define _noautoreq 'perl(utils)'
33 %define _sysconfdir /etc/nagios/plugins
34 %define plugindir %{_prefix}/lib/nagios/plugins
37 check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
40 %setup -q -n %{plugin}-%{version}
44 # no need for debug dependency
47 # not needed, so kill to avoid extra dep
52 %{__perl} Makefile.PL \
53 INSTALLVENDORSCRIPT=%{plugindir} \
57 %{?with_tests:%{__make} test}
60 rm -rf $RPM_BUILD_ROOT
62 DESTDIR=$RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT%{_sysconfdir}
65 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
66 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
68 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
69 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
70 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc AUTHORS Changes NEWS README INSTALL TODO VERSION
78 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
79 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
80 %attr(755,root,root) %{plugindir}/%{plugin}
81 %{_mandir}/man3/*.3pm*