]> git.pld-linux.org Git - packages/cacti-template-apcupsd.git/commitdiff
- new auto/ac/cacti-template-apcupsd-1_1-1 auto/th/cacti-template-apcupsd-1_1-1
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 18 Dec 2011 14:37:17 +0000 (14:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cacti-template-apcupsd.spec -> 1.1
    path.patch -> 1.1

cacti-template-apcupsd.spec [new file with mode: 0644]
path.patch [new file with mode: 0644]

diff --git a/cacti-template-apcupsd.spec b/cacti-template-apcupsd.spec
new file mode 100644 (file)
index 0000000..1e3d2bb
--- /dev/null
@@ -0,0 +1,53 @@
+%define                template apcupsd
+%define                php_min_version 5.0.0
+%include       /usr/lib/rpm/macros.php
+Summary:       Pulls APC data via APC UPS Daemon (apcupsd) for non-SNMP hardware
+Name:          cacti-template-%{template}
+Version:       1.1
+Release:       1
+License:       GPL v2
+Group:         Applications/WWW
+Source0:       http://docs.cacti.net/_media/usertemplate:data:apc:apcupsd:apcupsd_%{version}.zip
+# Source0-md5: eedc80bd5d93826b7df914f5070bf625
+Patch0:                path.patch
+URL:           http://docs.cacti.net/usertemplate:data:apc:apcupsd
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.554
+BuildRequires: unzip
+Requires:      cacti >= 0.8.7e-8
+Requires:      php-common >= 4:%{php_min_version}
+Requires:      php-pcre
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                cactidir                /usr/share/cacti
+%define                resourcedir             %{cactidir}/resource
+%define                scriptsdir              %{cactidir}/scripts
+
+%description
+Pulls APC data via APC UPS Daemon (apcupsd) for non-SNMP hardware.
+
+%prep
+%setup -qc
+%undos -f php
+%patch0 -p1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}}
+cp -a *.xml $RPM_BUILD_ROOT%{resourcedir}
+install -p *.php $RPM_BUILD_ROOT%{scriptsdir}
+
+%post
+%cacti_import_template %{resourcedir}/cacti_graph_template_apc_battery_statistics.xml
+%cacti_import_template %{resourcedir}/cacti_graph_template_apc_line_statistics.xml
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc readme.txt
+%attr(755,root,root) %{scriptsdir}/query_apcupsd.php
+%{resourcedir}/cacti_graph_template_apc_battery_statistics.xml
+%{resourcedir}/cacti_graph_template_apc_line_statistics.xml
diff --git a/path.patch b/path.patch
new file mode 100644 (file)
index 0000000..0f2aa32
--- /dev/null
@@ -0,0 +1,16 @@
+--- cacti-template-apcupsd-1.1/query_apcupsd.php       2011-12-18 15:54:52.061291018 +0200
++++ cacti-template-apcupsd-1.1/query_apcupsd.php       2011-12-18 16:28:57.310617407 +0200
+@@ -1,3 +1,4 @@
++#!/usr/bin/php
+ <?php
+ /*    Name:           apcupsd query 
+@@ -18,7 +19,7 @@
+                               Note: Windows users *MUST* use the 8.3 file path!
+  */
+-$APCACCESS_PATH = "C:\\apcupsd\\bin\\";
++$APCACCESS_PATH = "/usr/sbin/";
+ /* **** DO NOT EDIT BELOW THIS LINE ****************************************************************** */
This page took 0.094684 seconds and 4 git commands to generate.