From 80093be74fbed8d4459938e19ff00920a41a9712 Mon Sep 17 00:00:00 2001 From: Philip Knirsch Date: Mon, 23 Feb 2009 18:03:35 +0100 Subject: - Real first complete version with initscript, config file and proper Makefile and packaging. --- tuned.spec | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'tuned.spec') diff --git a/tuned.spec b/tuned.spec index 422b60f..32d65e8 100644 --- a/tuned.spec +++ b/tuned.spec @@ -6,6 +6,10 @@ License: GPLv2+ Group: System Environment/Daemons Source: tuned-%{version}.tar.bz2 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(postun): initscripts BuildArch: noarch %description @@ -13,7 +17,7 @@ The tuned package contains a daemon that tunes system settings dynamically. %package utils Summary: Disk and net monitoring systemtap scripts -Requires: kernel-debuginfo +Requires: systemtap kernel-debuginfo Group: Applications/System %description utils @@ -31,18 +35,33 @@ make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} +%post +/sbin/chkconfig --add tuned + +%preun +if [ $1 = 0 ] ; then + /sbin/service tuned stop >/dev/null 2>&1 + /sbin/chkconfig --del tuned +fi + +%postun +if [ "$1" -ge "1" ] ; then + /sbin/service tuned condrestart >/dev/null 2>&1 || : +fi + %files %defattr(-,root,root) -%{bin}/tuned -%{datadir}/tuned.py -%{datadir}/monitorplugins -%{datadir}/tuningplugins +%doc AUTHORS ChangeLog COPYING INSTALL NEWS README doc/* +%{_initddir}/tuned +%{_sysconfdir}/tuned.conf +%{_sbindir}/tuned +%{_datadir}/tuned %files utils -%{_bin}/netdevstat -%{_bin}/diskdevstat +%{_sbindir}/netdevstat +%{_sbindir}/diskdevstat %changelog -* Thu Feb 19 2009 Phil Knirsch - 0.1.0-1 +* Mon Feb 23 2009 Phil Knirsch - 0.1.0-1 - Initial version -- cgit