Author: thl
Update of /cvs/free/rpms/kqemu/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv5150
Modified Files:
.cvsignore sources
Added Files:
kqemu.init kqemu.spec kqemu.udev
Log Message:
import from livna
--- NEW FILE kqemu.init ---
#!/bin/sh
# init script for kqemu
#
# chkconfig: 2345 04 04
# description: The QEMU Accelerator Module increases the speed of QEMU when a PC is
emulated on a PC.
#
### BEGIN INIT INFO
# Provides: kqemu
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The QEMU Accelerator Module
# Description: The QEMU Accelerator Module increases the speed of QEMU
# when a PC is emulated on a PC.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
prog="kqemu"
lockfile="/var/lock/subsys/$prog"
RETVAL=0
start() {
echo -n $"Starting $prog: "
/sbin/modinfo kqemu &> /dev/null
RETVAL=$?
if [ $RETVAL = "0" ]; then
MAXFREQ=$(/sbin/sysctl -n dev.rtc.max-user-freq &> /dev/null)
if [ ! -z $MAXFREQ ]; then
if [ $MAXFREQ -lt 1024 ] ; then
/sbin/sysctl -q -n -w dev.rtc.max-user-freq=1024 &> /dev/null
fi
fi
/sbin/modprobe kqemu
RETVAL=$?
touch $lockfile
echo -n " kernel $(uname -r) " && echo_success
else
kernel_version=$(uname -r)
if [[ "${kernel_version%%___*}" = *xen ]] ; then
echo -n " kernel-xen not supported." && echo_warning
RETVAL=1
rm -f $lockfile
else
echo -n " kqemu.ko not found for $(uname -r)" && echo_failure
RETVAL=1
rm -f $lockfile
fi
fi
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
/sbin/modprobe -r kqemu
RETVAL=$?
if [ $RETVAL = "0" ]; then
rm -f $lockfile
echo -n " stopped" && echo_success
else
echo -n " did not stop" && echo_failure
fi
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
lsmod | grep kqemu > /dev/null
if [ $? = "0" ]; then
echo $" $prog is loaded"
else
echo $" $prog is not loaded"
fi
;;
restart)
stop
start
;;
condrestart)
lsmod | grep kqemu > /dev/null
if [ $? = "0" ]; then
restart
else
start
fi
;;
reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|condrestart|reload|status}"
exit 1
esac
exit $RETVAL
--- NEW FILE kqemu.spec ---
Name: kqemu
Version: 1.3.0
Release: 0.8.pre11%{?dist}
Summary: The QEMU Accelerator Module (KQEMU)
Group: System Environment/Kernel
License: GPLv2
URL:
http://bellard.org/qemu/
Source0:
http://bellard.org/qemu/kqemu-%{version}pre11.tar.gz
Source1: %{name}.init
Source2: %{name}.udev
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
ExcludeArch: ppc ppc64
Provides: kqemu-kmod-common = %{version}
Requires: kqemu-kmod >= %{version}
Obsoletes: kqemu-kmod < %{version}
Requires(post): /sbin/chkconfig
Requires(post): /sbin/service
Requires(preun): /sbin/service
Requires(preun): /sbin/chkconfig
Requires: qemu >= 0.9.1
%description
The QEMU Accelerator Module increases the speed of QEMU when a PC is
emulated on a PC. It runs most of the target application code directly
on the host processor to achieve near native performance.
%prep
%setup -q -n kqemu-%{version}pre11
%build
# Nothing to build - was only needed for doc
echo "Nothing nothing to build"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -pm 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/kqemu
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/60-kqemu.rules
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add kqemu ||:
# /sbin/service kqemu start || :
fi
%preun
if [ "$1" = 0 ]; then
/sbin/service kqemu stop
/sbin/chkconfig --del kqemu || :
fi
%files
%defattr(-,root,root,-)
%doc Changelog COPYING LICENSE README
%doc tests *.html
%config %{_sysconfdir}/udev/rules.d/60-kqemu.rules
%{_initrddir}/kqemu
%changelog
* Sat Oct 04 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 1.3.0-0.8.pre11
- rebuild for rpm fusion
* Fri Jun 6 2008 kwizart < kwizart at
gmail.com > - 1.3.0-0.7.pre11
- Update init script
* Wed Jan 9 2008 kwizart < kwizart at
gmail.com > - 1.3.0-0.6.pre11
- Fix ExcludeArch ppc for plague
* Sat Jan 5 2008 kwizart < kwizart at
gmail.com > - 1.3.0-0.4.pre11
- Handle dev.rtc.max-user-freq with sysctl
- Add ExclusiveArch: i386 x86_64
- Udev rule in source
* Fri Nov 2 2007 kwizart < kwizart at
gmail.com > - 1.3.0-0.3.pre11
- initscript is now faster
- Disable make doc (already done).
* Fri Nov 2 2007 kwizart < kwizart at
gmail.com > - 1.3.0-0.2.pre11
- Clean for rpmfusion merge
- Improve initscript
* Fri Feb 09 2007 kwizart < kwizart at
gmail.com > - 1.3.0-0.1.pre11
- Initial GPL Release.
--- NEW FILE kqemu.udev ---
KERNEL=="kqemu", NAME="%k", MODE="0666"
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/kqemu/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 3 Oct 2008 11:59:54 -0000 1.1
+++ .cvsignore 4 Oct 2008 12:24:32 -0000 1.2
@@ -0,0 +1 @@
+kqemu-1.3.0pre11.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/kqemu/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 3 Oct 2008 11:59:54 -0000 1.1
+++ sources 4 Oct 2008 12:24:32 -0000 1.2
@@ -0,0 +1 @@
+970521874ef8b1ba4598925ace5936c3 kqemu-1.3.0pre11.tar.gz