SPECS: template-cacti-plugin.spec - what perl? fragmets for add_template fr...

glen glen at pld-linux.org
Wed Jan 21 13:17:36 CET 2009


Author: glen                         Date: Wed Jan 21 12:17:35 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- what perl? fragmets for add_template from cacti-plugin-lighttpd.spec

---- Files affected:
SPECS:
   template-cacti-plugin.spec (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SPECS/template-cacti-plugin.spec
diff -u SPECS/template-cacti-plugin.spec:1.7 SPECS/template-cacti-plugin.spec:1.8
--- SPECS/template-cacti-plugin.spec:1.7	Thu Jun 26 23:16:50 2008
+++ SPECS/template-cacti-plugin.spec	Wed Jan 21 13:17:29 2009
@@ -1,8 +1,6 @@
 # $Revision$, $Date$
-%define		namesrc	namesrc
-%include	/usr/lib/rpm/macros.perl
+%define		plugin PLUGIN_NAME
 Summary:	Plugin for Cacti -
-#Summary(pl.UTF-8):	Wtyczka do Cacti -
 Name:		cacti-plugin-nameplugin
 Version:	0.1
 Release:	0.1
@@ -11,12 +9,14 @@
 Source0:	http://mirror.cactiusers.org/downloads/plugins/%{namesrc}-%{version}.zip
 # Source0-md5:
 URL:		http://www.cactiusers.org/
-BuildRequires:	rpm-perlprov
-Requires:	cacti
+Requires:	cacti >= 0.8.6j
+Requires:	cacti-add_template
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		webcactipluginroot /usr/share/cacti/plugins/%{namesrc}
+%define		cactidir		/usr/share/cacti
+%define		resourcedir		%{cactidir}/resource
+%define		scriptsdir		%{cactidir}/scripts
 
 %description
 Plugin for Cacti -
@@ -32,8 +32,12 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{webcactipluginroot}
-cp -a * $RPM_BUILD_ROOT%{webcactipluginroot}
+install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir}}
+cp -a *.xml $RPM_BUILD_ROOT%{resourcedir}
+install *.php $RPM_BUILD_ROOT%{scriptsdir}
+
+%post
+%{_sbindir}/cacti-add_template %{resourcedir}/PLUGIN_NAME.xml
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -41,7 +45,8 @@
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README
-%{webcactipluginroot}
+%attr(755,root,root) %{scriptsdir}/PLUGIN_NAME.php
+%{resourcedir}/PLUGIN_NAME.xml
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -49,6 +54,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8  2009/01/21 12:17:29  glen
+- what perl? fragmets for add_template from cacti-plugin-lighttpd.spec
+
 Revision 1.7  2008/06/26 21:16:50  qboosh
 - unwrapped where it should not be
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/template-cacti-plugin.spec?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list