]>
Commit | Line | Data |
---|---|---|
6e4444f9 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
6e4444f9 | 5 | %define plugin check_rbl |
ea66c793 | 6 | Summary: Nagios plugin to check if an server is blacklisted in RBL servers |
6e4444f9 | 7 | Name: nagios-plugin-%{plugin} |
66ddd406 | 8 | Version: 1.6.3 |
5c964f59 | 9 | Release: 1 |
1953d4f8 | 10 | License: GPL v3 |
6e4444f9 | 11 | Group: Networking |
23f0451e | 12 | Source0: https://github.com/matteocorti/check_rbl/releases/download/v%{version}/%{plugin}-%{version}.tar.gz |
66ddd406 | 13 | # Source0-md5: d60ba8d937e11e0b9a8e27ad533e199c |
6e4444f9 | 14 | Source1: %{plugin}.cfg |
23f0451e | 15 | URL: https://github.com/matteocorti/check_rbl/wiki |
871773f7 ER |
16 | BuildRequires: perl-ExtUtils-MakeMaker >= 6.42 |
17 | BuildRequires: rpm-perlprov >= 4.1-13 | |
6e4444f9 | 18 | BuildRequires: sed >= 4.0 |
6e4444f9 | 19 | %if %{with tests} |
23f0451e AM |
20 | BuildRequires: perl-Data-Validate-Domain |
21 | BuildRequires: perl-Data-Validate-IP | |
66ddd406 | 22 | BuildRequires: perl-Monitoring-Plugin |
afac954d | 23 | BuildRequires: perl-Nagios-Plugin >= 0.31 |
6e4444f9 | 24 | BuildRequires: perl-Net-DNS |
66ddd406 | 25 | BuildRequires: perl-Net-IP |
6e4444f9 ER |
26 | BuildRequires: perl-Readonly |
27 | %endif | |
871773f7 | 28 | Requires: nagios-common |
6e4444f9 ER |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
6e4444f9 ER |
32 | %define _sysconfdir /etc/nagios/plugins |
33 | %define plugindir %{_prefix}/lib/nagios/plugins | |
34 | ||
35 | %description | |
ea66c793 | 36 | Nagios plugin to check if an server is blacklisted in RBL servers. |
6e4444f9 ER |
37 | |
38 | %prep | |
39 | %setup -q -n %{plugin}-%{version} | |
40 | ||
6e4444f9 ER |
41 | %build |
42 | %{__perl} Makefile.PL \ | |
43 | INSTALLVENDORSCRIPT=%{plugindir} \ | |
44 | INSTALLDIRS=vendor | |
45 | ||
46 | %{__make} | |
47 | %{?with_tests:%{__make} test} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | %{__make} install \ | |
52 | DESTDIR=$RPM_BUILD_ROOT | |
53 | ||
54 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
afac954d | 55 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg |
2dcc1040 AM |
56 | |
57 | install check_rbl.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini | |
6e4444f9 | 58 | |
afac954d ER |
59 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
60 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist | |
61 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod | |
6e4444f9 ER |
62 | |
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
6804bfc5 | 68 | %doc AUTHORS Changes NEWS README.md INSTALL TODO VERSION |
6e4444f9 | 69 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg |
07d90841 | 70 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini |
6e4444f9 | 71 | %attr(755,root,root) %{plugindir}/%{plugin} |
b9cbc94d | 72 | %{_mandir}/man1/check_rbl.1* |