]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blob - nagios-plugin-check_rbl.spec
3641fb63021ece893e09b20cf8adae104530086c
[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.7.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:  aaa250b98b3a40020876d29bdf9b1e45
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-Monitoring-Plugin
23 BuildRequires:  perl-Nagios-Plugin >= 0.31
24 BuildRequires:  perl-Net-DNS
25 BuildRequires:  perl-Net-IP
26 BuildRequires:  perl-Readonly
27 %endif
28 Requires:       nagios-common
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _sysconfdir     /etc/nagios/plugins
33 %define         plugindir       %{_prefix}/lib/nagios/plugins
34
35 %description
36 Nagios plugin to check if an server is blacklisted in RBL servers.
37
38 %prep
39 %setup -q -n %{plugin}-%{version}
40
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}
55 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
56
57 install check_rbl.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.ini
58
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
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %files
67 %defattr(644,root,root,755)
68 %doc AUTHORS Changes NEWS README.md INSTALL TODO VERSION
69 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
70 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.ini
71 %attr(755,root,root) %{plugindir}/%{plugin}
72 %{_mandir}/man1/check_rbl.1*
This page took 0.073836 seconds and 3 git commands to generate.