SPECS: nagios-snmp-plugins.spec - provide default command define

glen glen at pld-linux.org
Mon Aug 27 08:47:22 CEST 2007


Author: glen                         Date: Mon Aug 27 06:47:22 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- provide default command define

---- Files affected:
SPECS:
   nagios-snmp-plugins.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/nagios-snmp-plugins.spec
diff -u SPECS/nagios-snmp-plugins.spec:1.9 SPECS/nagios-snmp-plugins.spec:1.10
--- SPECS/nagios-snmp-plugins.spec:1.9	Tue Feb 13 08:16:49 2007
+++ SPECS/nagios-snmp-plugins.spec	Mon Aug 27 08:47:16 2007
@@ -3,11 +3,12 @@
 Summary(pl.UTF-8):	Wtyczki dla Nagiosa do zdalnego monitorowania dysku i procesów po SNMP
 Name:		nagios-snmp-plugins
 Version:	1.0
-Release:	4
+Release:	5
 License:	GPL
 Group:		Applications/System
 Source0:	ftp://ftp.hometree.net/pub/nagios-snmp-plugins/%{name}-%{version}.tar.gz
 # Source0-md5:	cf70e405718d016debe206d01f54262c
+Source1:	%{name}.cfg
 Patch0:		%{name}-format-report.patch
 URL:		ftp://ftp.hometree.net/pub/nagios-snmp-plugins/index.html
 BuildRequires:	autoconf
@@ -19,7 +20,8 @@
 Obsoletes:	netsaint-snmp-plugins
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define	_plugindir	%{_libdir}/nagios/plugins
+%define		_plugindir	%{_libdir}/nagios/plugins
+%define		_sysconfdir	/etc/nagios/plugins
 
 %description
 These plugins allow you to monitor disk space and running processes on
@@ -32,6 +34,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%{__sed} -e 's, at plugindir@,%{_plugindir},' %{SOURCE1} > %{name}.cfg
 
 %build
 %{__aclocal}
@@ -43,8 +46,9 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_plugindir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_plugindir}}
 
+cp -a %{name}.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.cfg
 install check_snmp_disk $RPM_BUILD_ROOT%{_plugindir}
 install check_snmp_proc $RPM_BUILD_ROOT%{_plugindir}
 
@@ -54,6 +58,7 @@
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
 %attr(755,root,root) %{_plugindir}/*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -62,6 +67,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2007/08/27 06:47:16  glen
+- provide default command define
+
 Revision 1.9  2007/02/13 07:16:49  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/nagios-snmp-plugins.spec?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list