]>
Commit | Line | Data |
---|---|---|
4edcb3cf MWP |
1 | # TODO |
2 | # - Edit the MySQL options on line 143 of /cacti/plugins/npc/neb/inserter.c | |
d35f8256 MWP |
3 | %define namesrc npc |
4 | %include /usr/lib/rpm/macros.perl | |
5 | Summary: Plugin for Cacti - NPC | |
fc68046f | 6 | Summary(pl.UTF-8): Wtyczka do Cacti - NPC |
d35f8256 MWP |
7 | Name: cacti-plugin-npc |
8 | Version: 0.1.1a | |
3fc805a2 | 9 | Release: 0.2 |
d35f8256 MWP |
10 | License: GPL v2 |
11 | Group: Applications/WWW | |
3fc805a2 | 12 | Source0: http://forums.cacti.net/files/%{namesrc}-%{version}.tar.gz |
d35f8256 | 13 | # Source0-md5: 325f2e49070420346b55b7b4e2994d34 |
4edcb3cf | 14 | Patch0: %{name}-path_headers.patch |
3fc805a2 MWP |
15 | # inserter.c patch for nagios 3.0b6 from http://forums.cacti.net/about10327-0-asc-150.html |
16 | #Patch1: http://forums.cacti.net/files/neb_159.patch | |
17 | # from http://forums.cacti.net/about10327-0-asc-135.html | |
18 | Patch1: %{name}-extinfo.patch | |
19 | URL: http://forums.cacti.net/about10327 | |
d35f8256 | 20 | BuildRequires: rpm-perlprov |
baa07df1 | 21 | BuildRequires: nagios-devel >= 2.1 |
e5f34786 | 22 | BuildRequires: mysql-devel >= 4.1.0 |
4edcb3cf | 23 | Requires: cacti >= 0.8.6h |
baa07df1 | 24 | Requires: nagios >= 2.1 |
d35f8256 MWP |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %define webcactipluginroot /usr/share/cacti/plugins/%{namesrc} | |
d919104c | 28 | %define pathtonagiosmodules /usr/lib/nagios/modules |
d35f8256 MWP |
29 | |
30 | %description | |
31 | Plugin for Cacti - A UI replacement for Nagios integrated into Cacti. | |
32 | ||
4e927f40 JR |
33 | %description -l pl.UTF-8 |
34 | Wtyczka do Cacti - zamiennik interfejsu użytkownika dla Nagiosa | |
7954e233 | 35 | zintegrowany z Cacti. |
d35f8256 MWP |
36 | |
37 | %prep | |
38 | %setup -q -n %{namesrc} | |
4edcb3cf | 39 | %patch0 -p1 |
3fc805a2 | 40 | %patch1 -p1 |
d35f8256 | 41 | |
e5f34786 | 42 | %build |
e5f34786 MWP |
43 | cd ./neb |
44 | %{__make} | |
45 | ||
d35f8256 MWP |
46 | %install |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT%{webcactipluginroot} | |
e5f34786 MWP |
49 | install -d $RPM_BUILD_ROOT%{pathtonagiosmodules} |
50 | install ./neb/inserter.o $RPM_BUILD_ROOT%{pathtonagiosmodules} | |
51 | rm -fr ./neb | |
d35f8256 MWP |
52 | cp -aRf * $RPM_BUILD_ROOT%{webcactipluginroot} |
53 | ||
e5f34786 MWP |
54 | # Edit nagios.cfg and set: |
55 | # | |
56 | # retain_state_information=0 | |
57 | # event_broker_options=-1 | |
58 | # broker_module=%{pathtonagiosmodules}/inserter.o | |
59 | ||
60 | # Setting retain_state_information=0 causes all hosts and services to | |
61 | # go to a pending state until rechecked by Nagios. Without this setting | |
62 | # the inserter module will never update any data in NPC. Its a minor | |
63 | # inconvenience that I will try to fix in the inserter module. | |
64 | ||
d35f8256 MWP |
65 | %clean |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc TODO README | |
71 | %{webcactipluginroot} | |
e5f34786 | 72 | %{pathtonagiosmodules}/inserter.o |