]> git.pld-linux.org Git - packages/nagios-plugin-check_rbl.git/blob - nagios-plugin-check_rbl.spec
- by default check host itself
[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:        check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
8 Name:           nagios-plugin-%{plugin}
9 Version:        1.1.0
10 Release:        0.4
11 License:        GPL
12 Group:          Networking
13 Source0:        http://www.id.ethz.ch/people/allid_list/corti/%{plugin}-%{version}.tar.gz
14 # Source0-md5:  724cd353d48df3f4e9a98743146cfd0f
15 Source1:        %{plugin}.cfg
16 URL:            https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
17 BuildRequires:  sed >= 4.0
18 Requires:       nagios-common
19 %if %{with tests}
20 BuildRequires:  perl-Nagios-Plugin
21 BuildRequires:  perl-Net-DNS
22 BuildRequires:  perl-Parallel-Iterator
23 BuildRequires:  perl-Readonly
24 %endif
25 BuildRequires:  rpm-perlprov >= 4.1-13
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _noautoreq      'perl(utils)'
30
31 %define         _sysconfdir     /etc/nagios/plugins
32 %define         plugindir       %{_prefix}/lib/nagios/plugins
33
34 %description
35 check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
36
37 %prep
38 %setup -q -n %{plugin}-%{version}
39
40 %{__sed} -i -e '
41 # no need for debug dependency
42 /use Data::Dumper;/d
43
44 # not needed, so kill to avoid extra dep
45 /use version;/d
46 ' %{plugin}
47
48 %build
49 %{__perl} Makefile.PL \
50         INSTALLVENDORSCRIPT=%{plugindir} \
51         INSTALLDIRS=vendor
52
53 %{__make}
54 %{?with_tests:%{__make} test}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 install -d $RPM_BUILD_ROOT%{_sysconfdir}
62 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
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(755,root,root) %{plugindir}/%{plugin}
76 %{_mandir}/man3/*.3pm*
This page took 0.073471 seconds and 3 git commands to generate.