packages: cacti-template-apcupsd/cacti-template-apcupsd.spec (NEW), cacti-t...

glen glen at pld-linux.org
Sun Dec 18 15:37:22 CET 2011


Author: glen                         Date: Sun Dec 18 14:37:22 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/cacti-template-apcupsd:
   cacti-template-apcupsd.spec (NONE -> 1.1)  (NEW), path.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/cacti-template-apcupsd/cacti-template-apcupsd.spec
diff -u /dev/null packages/cacti-template-apcupsd/cacti-template-apcupsd.spec:1.1
--- /dev/null	Sun Dec 18 15:37:23 2011
+++ packages/cacti-template-apcupsd/cacti-template-apcupsd.spec	Sun Dec 18 15:37:17 2011
@@ -0,0 +1,63 @@
+# $Revision$, $Date$
+%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
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/12/18 14:37:17  glen
+- new

================================================================
Index: packages/cacti-template-apcupsd/path.patch
diff -u /dev/null packages/cacti-template-apcupsd/path.patch:1.1
--- /dev/null	Sun Dec 18 15:37:23 2011
+++ packages/cacti-template-apcupsd/path.patch	Sun Dec 18 15:37:17 2011
@@ -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 ****************************************************************** */
+ 
================================================================


More information about the pld-cvs-commit mailing list