]>
Commit | Line | Data |
---|---|---|
947b1c63 ER |
1 | %define template apcupsd |
2 | %define php_min_version 5.0.0 | |
947b1c63 ER |
3 | Summary: Pulls APC data via APC UPS Daemon (apcupsd) for non-SNMP hardware |
4 | Name: cacti-template-%{template} | |
5 | Version: 1.1 | |
c9de7350 | 6 | Release: 8 |
947b1c63 ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
9 | Source0: http://docs.cacti.net/_media/usertemplate:data:apc:apcupsd:apcupsd_%{version}.zip | |
10 | # Source0-md5: eedc80bd5d93826b7df914f5070bf625 | |
11 | Patch0: path.patch | |
12 | URL: http://docs.cacti.net/usertemplate:data:apc:apcupsd | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
14 | BuildRequires: rpmbuild(macros) >= 1.554 | |
15 | BuildRequires: unzip | |
c9de7350 | 16 | Requires: apcupsd |
947b1c63 | 17 | Requires: cacti >= 0.8.7e-8 |
a9926b85 | 18 | Requires: php(core) >= %{php_min_version} |
2bf01145 | 19 | Requires: php(pcre) |
947b1c63 ER |
20 | BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %define cactidir /usr/share/cacti | |
24 | %define resourcedir %{cactidir}/resource | |
25 | %define scriptsdir %{cactidir}/scripts | |
26 | ||
27 | %description | |
28 | Pulls APC data via APC UPS Daemon (apcupsd) for non-SNMP hardware. | |
29 | ||
30 | %prep | |
31 | %setup -qc | |
32 | %undos -f php | |
33 | %patch0 -p1 | |
34 | ||
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
37 | install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}} | |
0082b2ac | 38 | cp -p *.xml $RPM_BUILD_ROOT%{resourcedir} |
947b1c63 ER |
39 | install -p *.php $RPM_BUILD_ROOT%{scriptsdir} |
40 | ||
41 | %post | |
42 | %cacti_import_template %{resourcedir}/cacti_graph_template_apc_battery_statistics.xml | |
43 | %cacti_import_template %{resourcedir}/cacti_graph_template_apc_line_statistics.xml | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %files | |
49 | %defattr(644,root,root,755) | |
50 | %doc readme.txt | |
51 | %attr(755,root,root) %{scriptsdir}/query_apcupsd.php | |
52 | %{resourcedir}/cacti_graph_template_apc_battery_statistics.xml | |
53 | %{resourcedir}/cacti_graph_template_apc_line_statistics.xml |