]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blob - nagios-plugin-check_rbl.spec
- up to 1.6.0
[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 %define         plugin  check_rbl
6 Summary:        Nagios plugin to check if an server is blacklisted in RBL servers
7 Name:           nagios-plugin-%{plugin}
8 Version:        1.6.0
9 Release:        1
10 License:        GPL v3
11 Group:          Networking
12 Source0:        https://github.com/matteocorti/check_rbl/releases/download/v%{version}/%{plugin}-%{version}.tar.gz
13 # Source0-md5:  fb8491d012f64d4d60196f327b6760de
14 Source1:        %{plugin}.cfg
15 URL:            https://github.com/matteocorti/check_rbl/wiki
16 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.42
17 BuildRequires:  rpm-perlprov >= 4.1-13
18 BuildRequires:  sed >= 4.0
19 %if %{with tests}
20 BuildRequires:  perl-Data-Validate-Domain
21 BuildRequires:  perl-Data-Validate-IP
22 BuildRequires:  perl-Nagios-Plugin >= 0.31
23 BuildRequires:  perl-Net-DNS
24 BuildRequires:  perl-Readonly
25 %endif
26 Requires:       nagios-common
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _sysconfdir     /etc/nagios/plugins
31 %define         plugindir       %{_prefix}/lib/nagios/plugins
32
33 %description
34 Nagios plugin to check if an server is blacklisted in RBL servers.
35
36 %prep
37 %setup -q -n %{plugin}-%{version}
38
39 %build
40 %{__perl} Makefile.PL \
41         INSTALLVENDORSCRIPT=%{plugindir} \
42         INSTALLDIRS=vendor
43
44 %{__make}
45 %{?with_tests:%{__make} test}
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__make} install \
50         DESTDIR=$RPM_BUILD_ROOT
51
52 install -d $RPM_BUILD_ROOT%{_sysconfdir}
53 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
54
55 install check_rbl.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
56
57 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
58 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/check_rbl/.packlist
59 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/check_rbl.pod
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc AUTHORS Changes NEWS README.md INSTALL TODO VERSION
67 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
68 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
69 %attr(755,root,root) %{plugindir}/%{plugin}
70 %{_mandir}/man1/check_rbl.1*
This page took 0.079346 seconds and 3 git commands to generate.