packages: cacti-template-poller/cacti-template-poller.spec (NEW), cacti-tem...

glen glen at pld-linux.org
Wed Dec 15 09:20:58 CET 2010


Author: glen                         Date: Wed Dec 15 08:20:58 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial from forum

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

---- Diffs:

================================================================
Index: packages/cacti-template-poller/cacti-template-poller.spec
diff -u /dev/null packages/cacti-template-poller/cacti-template-poller.spec:1.1
--- /dev/null	Wed Dec 15 09:20:58 2010
+++ packages/cacti-template-poller/cacti-template-poller.spec	Wed Dec 15 09:20:53 2010
@@ -0,0 +1,58 @@
+# $Revision$, $Date$
+%define		template	poller
+Summary:	Cacti Poller Statistics
+Name:		cacti-template-%{template}
+Version:	0.1
+Release:	0.1
+License:	GPL v2
+Group:		Applications/WWW
+Source0:	http://forums.cacti.net/download/file.php?id=7501#/ss_poller.php.gz
+# Source0-md5:	7afa93ad133fcaf3ea073de4f19d8389
+Source1:	http://forums.cacti.net/download/file.php?id=7502#/cacti_host_template_local_cacti_polling_host.xml
+# Source1-md5:	3f54a6579f06745426163685facac558
+Patch0:		config.patch
+URL:		http://forums.cacti.net/viewtopic.php?f=12&t=18057
+BuildRequires:	rpmbuild(macros) >= 1.554
+BuildRequires:	sed >= 4.0
+Requires:	cacti >= 0.8.7e-8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		cactidir		/usr/share/cacti
+%define		resourcedir		%{cactidir}/resource
+%define		scriptsdir		%{cactidir}/scripts
+
+%description
+Cacti Poller Statistics.
+
+%prep
+%setup -qcT
+gzip -dc %{SOURCE0} > ss_poller.php
+cp -a %{SOURCE1} .
+%patch0 -p1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}}
+cp -a ss_poller.php $RPM_BUILD_ROOT%{scriptsdir}
+cp -a *.xml $RPM_BUILD_ROOT%{resourcedir}
+
+%post
+%cacti_import_template %{resourcedir}/cacti_host_template_local_cacti_polling_host.xml
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{scriptsdir}/ss_poller.php
+%{resourcedir}/*.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  2010/12/15 08:20:53  glen
+- initial from forum

================================================================
Index: packages/cacti-template-poller/config.patch
diff -u /dev/null packages/cacti-template-poller/config.patch:1.1
--- /dev/null	Wed Dec 15 09:20:58 2010
+++ packages/cacti-template-poller/config.patch	Wed Dec 15 09:20:53 2010
@@ -0,0 +1,11 @@
+--- cacti-template-poller-0.1/ss_poller.php~	2010-12-14 01:13:20.000000000 +0200
++++ cacti-template-poller-0.1/ss_poller.php	2010-12-14 01:13:54.404277972 +0200
+@@ -6,7 +6,7 @@
+ error_reporting(E_ALL);
+ 
+ if (!isset($called_by_script_server)) {
+-	include_once(dirname(__FILE__) . "/../include/config.php");
++	include_once(dirname(__FILE__) . "/../include/global.php");
+ 
+ 	print call_user_func("ss_poller") . "\n";
+ 	print call_user_func("ss_poller_items") . "\n";
================================================================


More information about the pld-cvs-commit mailing list