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