2 # - send_nrdp is crap, it never reports any errors back
4 %define php_min_version 5.1.0
5 %include /usr/lib/rpm/macros.php
6 Summary: Nagios Remote Data Processor (NDRP)
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
15 URL: http://exchange.nagios.org/directory/Addons/Passive-Checks/NRDP--2D-Nagios-Remote-Data-Processor/details
16 BuildRequires: rpmbuild(macros) >= 1.553
19 Requires: php-common >= 4:%{php_min_version}
21 Requires: php-simplexml
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _webapps /etc/webapps
27 %define _sysconfdir %{_webapps}/nagios
28 %define _appdir %{_datadir}/nagios/%{pkg}
31 %define _noautopear pear
32 # put it together for rpmbuild
33 %define _noautoreq %{?_noautophp} %{?_noautopear}
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
44 Summary: NRDP Host and Service Check Client
46 Requires: php-common >= 4:%{php_min_version}
50 Client to send results to Nagios Remote Data Processor (NDRP) server.
56 %undos clients/send_nrdp.php
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}
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
66 install -p clients/send_nrdp.php $RPM_BUILD_ROOT%{_bindir}/send_nrdp
69 rm -rf $RPM_BUILD_ROOT
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
77 # tmp dir for data exchange nagios/webserver
78 %attr(2770,root,nagcmd) %dir /var/lib/nagios/%{pkg}
81 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_bindir}/send_nrdp