diff options
-rw-r--r-- | system/kqemu/README | 7 | ||||
-rw-r--r-- | system/kqemu/doinst.sh | 4 | ||||
-rw-r--r-- | system/kqemu/kqemu.SlackBuild | 84 | ||||
-rw-r--r-- | system/kqemu/kqemu.info | 8 | ||||
-rw-r--r-- | system/kqemu/slack-desc | 12 |
5 files changed, 115 insertions, 0 deletions
diff --git a/system/kqemu/README b/system/kqemu/README new file mode 100644 index 0000000000..24e2634fb5 --- /dev/null +++ b/system/kqemu/README @@ -0,0 +1,7 @@ +kqemu: The kermel module for qemu > 0.9.1 + +The QEMU Accelerator (KQEMU) is a driver allowing a user application to +run x86 code in a Virtual Machine (VM). The code can be either user or +kernel code, in 64, 32 or 16 bit protected mode. KQEMU is very similar +in essence to the VM86 Linux syscall call, but it adds some new concepts +to improve memory handling. diff --git a/system/kqemu/doinst.sh b/system/kqemu/doinst.sh new file mode 100644 index 0000000000..a91532f67e --- /dev/null +++ b/system/kqemu/doinst.sh @@ -0,0 +1,4 @@ +# Re-generate modules.dep and map files. +if [ -x sbin/depmod ]; then + chroot . /sbin/depmod -ae @KERNEL@ 1> /dev/null 2> /dev/null +fi diff --git a/system/kqemu/kqemu.SlackBuild b/system/kqemu/kqemu.SlackBuild new file mode 100644 index 0000000000..ec466278ba --- /dev/null +++ b/system/kqemu/kqemu.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for kqemu + +# Copyright 2009 David Woodfall <dave@unrealize.co.uk> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Modified by the SlackBuilds.org project + +PRGNAM=kqemu +VERSION=${VERSION:-1.4.0pre1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +KERNELVERSION=${KERNELVERSION:-$(uname -r)} +PKG_VERS=${VERSION}_$(echo $KERNELVERSION | tr - _) + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --kernel-path=/lib/modules/${KERNELVERSION}/build + +make +sed -i "s/\/lib/\$PKG\/lib/" install.sh +PKG=$TMP/package-$PRGNAM make install + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp Changelog README LICENSE COPYING $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s%@KERNEL@%$KERNELVERSION%" $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERS-$ARCH-$BUILD$TAG.tgz + diff --git a/system/kqemu/kqemu.info b/system/kqemu/kqemu.info new file mode 100644 index 0000000000..d9f02e3f02 --- /dev/null +++ b/system/kqemu/kqemu.info @@ -0,0 +1,8 @@ +PRGNAM="kqemu" +VERSION="1.4.0pre1" +HOMEPAGE="http://www.nongnu.org/qemu" +DOWNLOAD="http://www.nongnu.org/qemu/kqemu-1.4.0pre1.tar.gz" +MD5SUM="d738d8ca7332211ab716ec3213d82ee1" +MAINTAINER="David Woodfall" +EMAIL="dave@unrealize.co.uk" +APPROVED="dsomero" diff --git a/system/kqemu/slack-desc b/system/kqemu/slack-desc new file mode 100644 index 0000000000..3c8fabff84 --- /dev/null +++ b/system/kqemu/slack-desc @@ -0,0 +1,12 @@ + |-----handy-ruler------------------------------------------------------| +kqemu: kqemu (kermel accelerator module for qemu) +kqemu: +kqemu: The QEMU Accelerator (KQEMU) is a driver allowing a user application to +kqemu: run x86 code in a Virtual Machine (VM). The code can be either user or +kqemu: kernel code, in 64, 32 or 16 bit protected mode. KQEMU is very similar +kqemu: in essence to the VM86 Linux syscall call, but it adds some new concepts +kqemu: to improve memory handling. +kqemu: +kqemu: Homepage: http://www.nongnu.org/qemu +kqemu: +kqemu:
\ No newline at end of file |