]>
Commit | Line | Data |
---|---|---|
4edcb3cf | 1 | # TODO |
9c63e9b7 ER |
2 | # - bundles Doctrine 1.0.7: use system phpdoctrine.spec |
3 | # - bundles Ext JS Library 2.2 | |
9e291d54 | 4 | # - forum thread: http://forums.cacti.net/viewtopic.php?t=26540 |
a2a637f1 | 5 | %define plugin npc |
9e291d54 | 6 | %define php_min_version 5.2.1 |
9e291d54 | 7 | Summary: Nagios Plugin for Cacti (NPC) |
fc68046f | 8 | Summary(pl.UTF-8): Wtyczka do Cacti - NPC |
d35f8256 | 9 | Name: cacti-plugin-npc |
9e291d54 | 10 | Version: 2.0.4 |
425587bf | 11 | Release: 0.7 |
9e291d54 | 12 | License: GPL v3 |
d35f8256 | 13 | Group: Applications/WWW |
9e291d54 ER |
14 | #Source0: http://downloads.sourceforge.net/gibtmirdas/npc-%{version}.tar.gz |
15 | Source0: npc-%{version}.tar.gz | |
ad22bf1e | 16 | Patch0: %{name}-graphs_url.patch |
425587bf | 17 | Patch1: ndoutils-1.5.patch |
9e291d54 ER |
18 | # Source0-md5: 7b30302c544f10ed73cff406fda14499 |
19 | URL: https://trac.assembla.com/npc/ | |
20 | BuildRequires: rpmbuild(macros) >= 1.553 | |
21 | Requires: cacti >= 0.8.7b | |
22 | Requires: cacti(pia) >= 2.0 | |
23 | Requires: nagios >= 3.0 | |
9e291d54 | 24 | Requires: nagios-ndoutils >= 1.4b7 |
4b58f0b0 ER |
25 | Requires: php(core) >= %{php_min_version} |
26 | Requires: php(ctype) | |
27 | Requires: php(date) | |
28 | Requires: php(iconv) | |
29 | Requires: php(json) | |
30 | Requires: php(mbstring) | |
31 | Requires: php(mysql) | |
32 | Requires: php(mysqli) | |
33 | Requires: php(pcre) | |
34 | Requires: php(session) | |
35 | Requires: php(simplexml) | |
36 | Requires: php(spl) | |
9e291d54 | 37 | BuildArch: noarch |
d35f8256 MWP |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
a2a637f1 ER |
40 | %define cactidir /usr/share/cacti |
41 | %define plugindir %{cactidir}/plugins/%{plugin} | |
42 | %define moduledir %{_libdir}/nagios/modules | |
d35f8256 | 43 | |
9e291d54 ER |
44 | %define _noautoreq pear |
45 | ||
d35f8256 | 46 | %description |
9e291d54 ER |
47 | The purpose of NPC is to be a complete web based UI replacement to |
48 | Nagios while fully integrating into Cacti using the Cacti Plugin | |
49 | Architecture. This integration will provide a single point of access | |
50 | for trending and alert monitoring. | |
d35f8256 | 51 | |
4e927f40 JR |
52 | %description -l pl.UTF-8 |
53 | Wtyczka do Cacti - zamiennik interfejsu użytkownika dla Nagiosa | |
7954e233 | 54 | zintegrowany z Cacti. |
d35f8256 MWP |
55 | |
56 | %prep | |
9e291d54 ER |
57 | %setup -qc |
58 | mv %{plugin}/*.debug . | |
59 | mv %{plugin}/build.xml . | |
60 | mv %{plugin}/{README,LICENSE} . | |
61 | %undos -f php README | |
ad22bf1e | 62 | %patch0 -p1 |
425587bf | 63 | %patch1 -p1 |
e5f34786 | 64 | |
9c63e9b7 | 65 | cd %{plugin} |
425587bf ER |
66 | |
67 | # part of ndoutils | |
68 | %{__rm} -r queries | |
69 | # upgrade_schema.sql - adds indexes to db | |
70 | ||
71 | # dev code, not needed for production functionality | |
9c63e9b7 ER |
72 | %{__rm} controllers/layoutDev.php |
73 | %{__rm} -r js/src | |
74 | %{__rm} js/ext/*-debug.js | |
75 | %{__rm} js/ext/resources/resources.jsb | |
76 | ||
d35f8256 MWP |
77 | %install |
78 | rm -rf $RPM_BUILD_ROOT | |
9e291d54 ER |
79 | install -d $RPM_BUILD_ROOT%{plugindir} |
80 | cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir} | |
e5f34786 | 81 | |
d35f8256 MWP |
82 | %clean |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
9e291d54 | 87 | %doc README |
e41da878 ER |
88 | %dir %{plugindir} |
89 | %attr(755,root,root) %{plugindir}/cli.php | |
90 | %attr(755,root,root) %{plugindir}/perfdata.php | |
91 | %{plugindir}/config.php | |
92 | %{plugindir}/index.php | |
93 | %{plugindir}/nagioscmd.php | |
94 | %{plugindir}/npc.php | |
95 | %{plugindir}/setup.php | |
96 | %{plugindir}/top_graph_header.php | |
97 | %{plugindir}/upgrade_schema.sql | |
98 | %{plugindir}/controllers | |
99 | %{plugindir}/css | |
100 | %{plugindir}/images | |
101 | %{plugindir}/js | |
102 | %{plugindir}/lib | |
103 | %{plugindir}/models |