]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - bundles Doctrine 1.0.7: use system phpdoctrine.spec | |
3 | # - bundles Ext JS Library 2.2 | |
4 | # - forum thread: http://forums.cacti.net/viewtopic.php?t=26540 | |
5 | %define plugin npc | |
6 | %define php_min_version 5.2.1 | |
7 | Summary: Nagios Plugin for Cacti (NPC) | |
8 | Summary(pl.UTF-8): Wtyczka do Cacti - NPC | |
9 | Name: cacti-plugin-npc | |
10 | Version: 2.0.4 | |
11 | Release: 0.7 | |
12 | License: GPL v3 | |
13 | Group: Applications/WWW | |
14 | #Source0: http://downloads.sourceforge.net/gibtmirdas/npc-%{version}.tar.gz | |
15 | Source0: npc-%{version}.tar.gz | |
16 | Patch0: %{name}-graphs_url.patch | |
17 | Patch1: ndoutils-1.5.patch | |
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 | |
24 | Requires: nagios-ndoutils >= 1.4b7 | |
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) | |
37 | BuildArch: noarch | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %define cactidir /usr/share/cacti | |
41 | %define plugindir %{cactidir}/plugins/%{plugin} | |
42 | %define moduledir %{_libdir}/nagios/modules | |
43 | ||
44 | %define _noautoreq pear | |
45 | ||
46 | %description | |
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. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Wtyczka do Cacti - zamiennik interfejsu użytkownika dla Nagiosa | |
54 | zintegrowany z Cacti. | |
55 | ||
56 | %prep | |
57 | %setup -qc | |
58 | mv %{plugin}/*.debug . | |
59 | mv %{plugin}/build.xml . | |
60 | mv %{plugin}/{README,LICENSE} . | |
61 | %undos -f php README | |
62 | %patch0 -p1 | |
63 | %patch1 -p1 | |
64 | ||
65 | cd %{plugin} | |
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 | |
72 | %{__rm} controllers/layoutDev.php | |
73 | %{__rm} -r js/src | |
74 | %{__rm} js/ext/*-debug.js | |
75 | %{__rm} js/ext/resources/resources.jsb | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | install -d $RPM_BUILD_ROOT%{plugindir} | |
80 | cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir} | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc README | |
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 |