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