]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blame - nagios-plugin-check_rbl.spec
- apply patch after sed
[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
ea66c793 7Summary: Nagios plugin to check if an server is blacklisted in RBL servers
6e4444f9
ER
8Name: nagios-plugin-%{plugin}
9Version: 1.1.0
4f375f16 10Release: 4
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
ea66c793 16# https://trac.id.ethz.ch/projects/nagios_plugins/ticket/67
07d90841 17Source2: %{plugin}.ini
ea66c793 18# https://trac.id.ethz.ch/projects/nagios_plugins/ticket/66
b62736fd 19Patch0: verbose-reporting.patch
65afeb12 20Patch1: mdns.patch
6e4444f9 21URL: https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
871773f7
ER
22BuildRequires: perl-ExtUtils-MakeMaker >= 6.42
23BuildRequires: rpm-perlprov >= 4.1-13
6e4444f9 24BuildRequires: sed >= 4.0
6e4444f9
ER
25%if %{with tests}
26BuildRequires: perl-Nagios-Plugin
27BuildRequires: perl-Net-DNS
28BuildRequires: perl-Parallel-Iterator
29BuildRequires: perl-Readonly
30%endif
871773f7 31Requires: nagios-common
6e4444f9
ER
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%define _noautoreq 'perl(utils)'
36
37%define _sysconfdir /etc/nagios/plugins
38%define plugindir %{_prefix}/lib/nagios/plugins
39
40%description
ea66c793 41Nagios plugin to check if an server is blacklisted in RBL servers.
6e4444f9
ER
42
43%prep
44%setup -q -n %{plugin}-%{version}
b62736fd 45%patch0 -p1
6e4444f9 46
ea66c793 47# https://trac.id.ethz.ch/projects/nagios_plugins/ticket/68
6e4444f9
ER
48%{__sed} -i -e '
49# no need for debug dependency
50/use Data::Dumper;/d
51
52# not needed, so kill to avoid extra dep
53/use version;/d
54' %{plugin}
55
6fdea355
ER
56%patch1 -p1
57
6e4444f9
ER
58%build
59%{__perl} Makefile.PL \
60 INSTALLVENDORSCRIPT=%{plugindir} \
61 INSTALLDIRS=vendor
62
63%{__make}
64%{?with_tests:%{__make} test}
65
66%install
67rm -rf $RPM_BUILD_ROOT
68%{__make} install \
69 DESTDIR=$RPM_BUILD_ROOT
70
71install -d $RPM_BUILD_ROOT%{_sysconfdir}
72cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
07d90841 73cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
6e4444f9
ER
74
75rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
76rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
77rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%files
83%defattr(644,root,root,755)
84%doc AUTHORS Changes NEWS README INSTALL TODO VERSION
85%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
07d90841 86%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
6e4444f9
ER
87%attr(755,root,root) %{plugindir}/%{plugin}
88%{_mandir}/man3/*.3pm*
This page took 0.064021 seconds and 4 git commands to generate.