summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/kvm-kmod/README9
-rw-r--r--system/kvm-kmod/doinst.sh4
-rw-r--r--system/kvm-kmod/kvm-kmod.SlackBuild110
-rw-r--r--system/kvm-kmod/kvm-kmod.info10
-rw-r--r--system/kvm-kmod/slack-desc19
5 files changed, 152 insertions, 0 deletions
diff --git a/system/kvm-kmod/README b/system/kvm-kmod/README
new file mode 100644
index 0000000000..7ac9a5a737
--- /dev/null
+++ b/system/kvm-kmod/README
@@ -0,0 +1,9 @@
+KVM (Kernel-based Virtual Machine) is a full virtualization solution
+for Linux on x86 hardware containing virtualization extensions
+(Intel VT or AMD-V).
+
+KVM consists of a loadable kernel module, 'kvm.ko', that provides the
+core virtualization infrastructure and a processor specific module,
+'kvm-intel.ko' or 'kvm-amd.ko'. This package builds new 'kvm' modules
+and headers for older kernels. The new 'kvm' modules do not overwrite
+the Slackware pre-built 'kvm' modules.
diff --git a/system/kvm-kmod/doinst.sh b/system/kvm-kmod/doinst.sh
new file mode 100644
index 0000000000..a91532f67e
--- /dev/null
+++ b/system/kvm-kmod/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/kvm-kmod/kvm-kmod.SlackBuild b/system/kvm-kmod/kvm-kmod.SlackBuild
new file mode 100644
index 0000000000..0adabf593c
--- /dev/null
+++ b/system/kvm-kmod/kvm-kmod.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Slackware build script for qemu-kvm
+
+# Written by Stu Miller <slackbuilds@go4it2day.com>
+#
+# 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.
+
+PRGNAM=kvm-kmod
+VERSION=${VERSION:-2.6.32.7}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+KERNEL=${KERNEL:-$(uname -r)}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+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" \
+./configure \
+ --arch=$ARCH
+
+make \
+ PREFIX=/usr \
+ PKGCONFIGDIR=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
+ docdir=/usr/doc/$PRGNAM-$VERSION
+make install \
+ PREFIX=/usr \
+ PKGCONFIGDIR=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
+ DESTDIR=$PKG
+
+# Eliminate unused pkgconfig text file
+rm -r $PKG/usr/lib${LIBDIRSUFFIX}
+
+# Move /etc/udev to /lib/udev
+mv $PKG/etc/udev $PKG/lib
+
+# Make modprobe prefer the new modules in /lib/modules/$KERNEL/extra/
+# We don't want to install this with a .new suffix, because we want it
+# removed with the package.
+mkdir -p $PKG/etc/depmod.d
+cat << EOF > $PKG/etc/depmod.d/kvm-$KERNEL.conf
+override kvm $KERNEL extra
+override kvm-amd $KERNEL extra
+override kvm-intel $KERNEL extra
+EOF
+
+# We don't want the modules.* files in the package
+rm -f $PKG/lib/modules/${KERNEL}/modules.*
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+mkdir -p $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@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/kvm-kmod/kvm-kmod.info b/system/kvm-kmod/kvm-kmod.info
new file mode 100644
index 0000000000..46cd841e19
--- /dev/null
+++ b/system/kvm-kmod/kvm-kmod.info
@@ -0,0 +1,10 @@
+PRGNAM="kvm-kmod"
+VERSION="2.6.32.7"
+HOMEPAGE="http://www.linux-kvm.org/page/Main_Page"
+DOWNLOAD="http://downloads.sourceforge.net/kvm/kvm-kmod-2.6.32.7.tar.bz2"
+MD5SUM="be047f22ff59fa47222fd012dc145375"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Stu Miller"
+EMAIL="slackbuilds@go4it2day.com"
+APPROVED="dsomero"
diff --git a/system/kvm-kmod/slack-desc b/system/kvm-kmod/slack-desc
new file mode 100644
index 0000000000..83898a9cd9
--- /dev/null
+++ b/system/kvm-kmod/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------------|
+kvm-kmod: kvm-kmod (KVM modules and headers for older kernels)
+kvm-kmod:
+kvm-kmod: KVM (Kernel-based Virtual Machine) is a full virtualization solution
+kvm-kmod: for Linux on x86 hardware containing virtualization extensions
+kvm-kmod: (Intel VT or AMD-V).
+kvm-kmod:
+kvm-kmod:
+kvm-kmod:
+kvm-kmod:
+kvm-kmod:
+kvm-kmod: