]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blob - nagios-plugin-check_rbl.spec
a317ad638a3ca6f1f2ae55ad6f9140957ecbe731
[packages/nagios-plugin-check_rbl.git] / nagios-plugin-check_rbl.spec
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
7 Summary:        Nagios plugin to check if an server is blacklisted in RBL servers
8 Name:           nagios-plugin-%{plugin}
9 Version:        1.2.0
10 Release:        2
11 License:        GPL
12 Group:          Networking
13 Source0:        https://trac.id.ethz.ch/projects/nagios_plugins/downloads/%{plugin}-%{version}.tar.gz
14 # Source0-md5:  630902d9d7b644a0ab6537030ec40f12
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
21 %if %{with tests}
22 BuildRequires:  perl-Nagios-Plugin
23 BuildRequires:  perl-Net-DNS
24 BuildRequires:  perl-Parallel-Iterator
25 BuildRequires:  perl-Readonly
26 %endif
27 Requires:       nagios-common
28 BuildArch:      noarch
29 BuildRoot:      %{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
37 Nagios plugin to check if an server is blacklisted in RBL servers.
38
39 %prep
40 %setup -q -n %{plugin}-%{version}
41
42 # https://trac.id.ethz.ch/projects/nagios_plugins/ticket/68
43 %{__sed} -i -e '
44 s/use version;\s*//
45 ' %{plugin}
46
47 %build
48 %{__perl} Makefile.PL \
49         INSTALLVENDORSCRIPT=%{plugindir} \
50         INSTALLDIRS=vendor
51
52 %{__make}
53 %{?with_tests:%{__make} test}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
60 install -d $RPM_BUILD_ROOT%{_sysconfdir}
61 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
62 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
63
64 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
65 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
66 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc AUTHORS Changes NEWS README INSTALL TODO VERSION
74 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
75 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
76 %attr(755,root,root) %{plugindir}/%{plugin}
77 %{_mandir}/man1/check_rbl.1*
This page took 0.064397 seconds and 2 git commands to generate.