SPECS: template-nagios-plugin.spec (NEW) - simple noarch template ...
glen
glen at pld-linux.org
Wed Oct 24 23:11:09 CEST 2007
Author: glen Date: Wed Oct 24 21:11:09 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- simple noarch template for nagios plugin
---- Files affected:
SPECS:
template-nagios-plugin.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SPECS/template-nagios-plugin.spec
diff -u /dev/null SPECS/template-nagios-plugin.spec:1.1
--- /dev/null Wed Oct 24 23:11:09 2007
+++ SPECS/template-nagios-plugin.spec Wed Oct 24 23:11:03 2007
@@ -0,0 +1,58 @@
+# $Revision$, $Date$
+%define _plugin check_template
+Summary: Nagios plugin to check ...
+Name: nagios-plugin-%{_plugin}
+Version: 0.1
+Release: 0.1
+License: - (enter GPL/GPL v2/LGPL/BSD/BSD-like/other license name here)
+Group: Networking
+#Source0: -
+# Source0-md5: af8da7807e1a03bf301fa70658fb08c3
+#Patch0: %{name}-defaultpass.patch
+URL: -
+Requires: nagios-core
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _plugindir %{_prefix}/lib/nagios/plugins
+%define _sysconfdir /etc/nagios/plugins
+
+%description
+
+%prep
+%setup -qcT
+install %{SOURCE0} %{_plugin}
+#%patch0 -p1
+
+cat > nagios.cfg <<'EOF'
+# Usage:
+# %{_plugin}
+define command {
+ command_name %{_plugin}
+ command_line %{_plugindir}/%{_plugin}
+}
+EOF
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_plugindir}}
+install %{_plugin} $RPM_BUILD_ROOT%{_plugindir}/%{_plugin}
+cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{_plugin}.cfg
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{_plugin}.cfg
+%attr(755,root,root) %{_plugindir}/%{_plugin}
+
+%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 2007/10/24 21:11:03 glen
+- simple noarch template for nagios plugin
+
================================================================
More information about the pld-cvs-commit
mailing list