]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blame - nagios-plugin-check_rbl.spec
- report hostname being checked in check result
[packages/nagios-plugin-check_rbl.git] / nagios-plugin-check_rbl.spec
CommitLineData
6e4444f9
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4
5%include /usr/lib/rpm/macros.perl
6%define plugin check_rbl
7Summary: check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
8Name: nagios-plugin-%{plugin}
9Version: 1.1.0
b62736fd 10Release: 0.7
6e4444f9
ER
11License: GPL
12Group: Networking
b62736fd 13Source0: https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{plugin}-%{version}.tar.gz
6e4444f9
ER
14# Source0-md5: 724cd353d48df3f4e9a98743146cfd0f
15Source1: %{plugin}.cfg
07d90841 16Source2: %{plugin}.ini
b62736fd 17Patch0: verbose-reporting.patch
6e4444f9
ER
18URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
19BuildRequires: sed >= 4.0
20Requires: nagios-common
21%if %{with tests}
22BuildRequires: perl-Nagios-Plugin
23BuildRequires: perl-Net-DNS
24BuildRequires: perl-Parallel-Iterator
25BuildRequires: perl-Readonly
26%endif
27BuildRequires: rpm-perlprov >= 4.1-13
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%define _noautoreq 'perl(utils)'
32
33%define _sysconfdir /etc/nagios/plugins
34%define plugindir %{_prefix}/lib/nagios/plugins
35
36%description
37check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
38
39%prep
40%setup -q -n %{plugin}-%{version}
b62736fd 41%patch0 -p1
6e4444f9
ER
42
43%{__sed} -i -e '
44# no need for debug dependency
45/use Data::Dumper;/d
46
47# not needed, so kill to avoid extra dep
48/use version;/d
49' %{plugin}
50
51%build
52%{__perl} Makefile.PL \
53 INSTALLVENDORSCRIPT=%{plugindir} \
54 INSTALLDIRS=vendor
55
56%{__make}
57%{?with_tests:%{__make} test}
58
59%install
60rm -rf $RPM_BUILD_ROOT
61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
63
64install -d $RPM_BUILD_ROOT%{_sysconfdir}
65cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
07d90841 66cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
6e4444f9
ER
67
68rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
69rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
70rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%files
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
07d90841 79%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
6e4444f9
ER
80%attr(755,root,root) %{plugindir}/%{plugin}
81%{_mandir}/man3/*.3pm*
This page took 0.101157 seconds and 4 git commands to generate.