]> git.pld-linux.org Git - packages/nagios-nrdp.git/blob - nagios-nrdp.spec
use virtual names for php deps
[packages/nagios-nrdp.git] / nagios-nrdp.spec
1 # TODO
2 # - send_nrdp  is crap, it never reports any errors back
3 %define         pkg     nrdp
4 %define         php_min_version 5.1.0
5 %include        /usr/lib/rpm/macros.php
6 Summary:        Nagios Remote Data Processor (NDRP)
7 Name:           nagios-%{pkg}
8 Version:        1.2
9 Release:        0.6
10 License:        GPL v2 (server), BSD (send_nrdp)
11 Group:          Applications/WWW
12 Source0:        http://assets.nagios.com/downloads/nrdp/nrdp.zip
13 # Source0-md5:  e67bb3c660b22d80abd8a06a4853d814
14 Patch0:         config.patch
15 URL:            http://exchange.nagios.org/directory/Addons/Passive-Checks/NRDP--2D-Nagios-Remote-Data-Processor/details
16 BuildRequires:  rpmbuild(macros) >= 1.553
17 Requires:       nagios
18 Requires:       nagios-cgi
19 Requires:       php(core) >= %{php_min_version}
20 Requires:       php(date)
21 Requires:       php(simplexml)
22 Requires:       php(xml)
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _webapps        /etc/webapps
27 %define         _sysconfdir     %{_webapps}/nagios
28 %define         _appdir         %{_datadir}/nagios/%{pkg}
29
30 # bad depsolver
31 %define         _noautopear     pear
32 # put it together for rpmbuild
33 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
34
35 %description
36 Nagios Remote Data Processor (NDRP) is a flexible data transport
37 mechanism and processor for Nagios. It is designed with a simple and
38 powerful architecture that allows for it to be easily extended and
39 customized to fit individual users' needs. It uses standard ports
40 protocols (HTTP(S) and XML) and can be implemented as a replacement
41 for NSCA.
42
43 %package client
44 Summary:        NRDP Host and Service Check Client
45 Group:          Networking
46 Requires:       php(core) >= %{php_min_version}
47 Requires:       php(date)
48
49 %description client
50 Client to send results to Nagios Remote Data Processor (NDRP) server.
51
52 %prep
53 %setup -qc
54 mv %{pkg}/* .
55 %patch0 -p1
56 %undos clients/send_nrdp.php
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},/var/lib/nagios/%{pkg},%{_bindir}}
61 cp -a server/* /$RPM_BUILD_ROOT%{_appdir}
62
63 mv $RPM_BUILD_ROOT{%{_appdir}/config.inc.php,%{_sysconfdir}/%{pkg}.php}
64 ln -s %{_sysconfdir}/%{pkg}.php $RPM_BUILD_ROOT%{_appdir}/config.inc.php
65
66 install -p clients/send_nrdp.php $RPM_BUILD_ROOT%{_bindir}/send_nrdp
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc CHANGES.TXT INSTALL.TXT LICENSE.TXT
74 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{pkg}.php
75 %{_appdir}
76
77 # tmp dir for data exchange nagios/webserver
78 %attr(2770,root,nagcmd) %dir /var/lib/nagios/%{pkg}
79
80 %files client
81 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_bindir}/send_nrdp
This page took 0.067416 seconds and 3 git commands to generate.