3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
6 %define plugin check_rbl
7 Summary: Nagios plugin to check if an server is blacklisted in RBL servers
8 Name: nagios-plugin-%{plugin}
13 Source0: https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{plugin}-%{version}.tar.gz
14 # Source0-md5: 220ea65daab4f65b5dc5d3d1fd0d23f5
15 Source1: %{plugin}.cfg
16 Source2: %{plugin}.ini
17 URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
18 BuildRequires: perl-ExtUtils-MakeMaker >= 6.42
19 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRequires: sed >= 4.0
22 BuildRequires: perl-Nagios-Plugin >= 0.31
23 BuildRequires: perl-Net-DNS
24 BuildRequires: perl-Readonly
26 Requires: nagios-common
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sysconfdir /etc/nagios/plugins
31 %define plugindir %{_prefix}/lib/nagios/plugins
34 Nagios plugin to check if an server is blacklisted in RBL servers.
37 %setup -q -n %{plugin}-%{version}
40 %{__perl} Makefile.PL \
41 INSTALLVENDORSCRIPT=%{plugindir} \
45 %{?with_tests:%{__make} test}
48 rm -rf $RPM_BUILD_ROOT
50 DESTDIR=$RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT%{_sysconfdir}
53 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
54 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
56 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
57 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
58 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
65 %doc AUTHORS Changes NEWS README INSTALL TODO VERSION
66 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
67 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
68 %attr(755,root,root) %{plugindir}/%{plugin}
69 %{_mandir}/man1/check_rbl.1*