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