2 # - Edit the MySQL options on line 143 of /cacti/plugins/npc/neb/inserter.c
4 %include /usr/lib/rpm/macros.perl
5 Summary: Plugin for Cacti - NPC
6 Summary(pl): Wtyczka do Cacti - NPC
11 Group: Applications/WWW
12 Source0: http://www.divagater.com/npc/%{namesrc}-%{version}.tar.gz
13 # Source0-md5: 325f2e49070420346b55b7b4e2994d34
14 Patch0: %{name}-path_headers.patch
15 URL: http://www.divagater.com/npc/
16 BuildRequires: rpm-perlprov
17 BuildRequires: nagios-devel
18 BuildRequires: mysql-devel >= 4.1.0
19 Requires: cacti >= 0.8.6h
20 # with plugin-architecture
21 Requires: nagios >= 2.0b4
22 ### compiled with --enable-event-broker
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define webcactipluginroot /usr/share/cacti/plugins/%{namesrc}
26 %define pathtonagiosmodules /path/to/nagios/modules
29 Plugin for Cacti - A UI replacement for Nagios integrated into Cacti.
32 Wtyczka do Cacti - zamiennik interfejsu u¿ytkownika dla Nagiosa
36 %setup -q -n %{namesrc}
40 # copy ./npc/neb/inserter.c and ./npc/neb/makefile to module/ under Nagios source directory and run make.
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{webcactipluginroot}
47 install -d $RPM_BUILD_ROOT%{pathtonagiosmodules}
48 install ./neb/inserter.o $RPM_BUILD_ROOT%{pathtonagiosmodules}
50 cp -aRf * $RPM_BUILD_ROOT%{webcactipluginroot}
52 # Edit nagios.cfg and set:
54 # retain_state_information=0
55 # event_broker_options=-1
56 # broker_module=%{pathtonagiosmodules}/inserter.o
58 # Setting retain_state_information=0 causes all hosts and services to
59 # go to a pending state until rechecked by Nagios. Without this setting
60 # the inserter module will never update any data in NPC. Its a minor
61 # inconvenience that I will try to fix in the inserter module.
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
70 %{pathtonagiosmodules}/inserter.o