summaryrefslogtreecommitdiff
path: root/system/qemu-kvm/qemu-kvm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/qemu-kvm/qemu-kvm.SlackBuild')
-rw-r--r--system/qemu-kvm/qemu-kvm.SlackBuild43
1 files changed, 20 insertions, 23 deletions
diff --git a/system/qemu-kvm/qemu-kvm.SlackBuild b/system/qemu-kvm/qemu-kvm.SlackBuild
index 463dee3125..46ec409263 100644
--- a/system/qemu-kvm/qemu-kvm.SlackBuild
+++ b/system/qemu-kvm/qemu-kvm.SlackBuild
@@ -22,10 +22,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=qemu-kvm
-VERSION=${VERSION:-0.12.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.12.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+KVMGROUP=${KVMGROUP:-kvm}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
# The script is set to build all possible Linux Target CPU emulators by default.
# Available Linux Target CPUs for full system emulation are:
# i386 x86_64 arm cris m68k microblaze mips mipsel mips64 mips64el
@@ -40,16 +50,6 @@ TAG=${TAG:-_SBo}
# providing full system emulation supporting Linux, BSD and Windows guests.
BUILD_ARCH=""
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -64,9 +64,6 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
# Needed to build man pages if build is ran from su
@@ -87,8 +84,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Remove the unneeded (and warning-inducing) NAME= setting from the udev rules
-patch -p1 < $CWD/fixup_udev_rules_file.diff
+# Fixup the udev rules file to remove the NAME="%k" and allow for a different
+# group to be used (no real need to require a kvm group)
+patch -p1 < $CWD/fixup_udev_rules.patch
# This translates the possible targets into the correct format for configure
TARGETS="$(for i in $BUILD_ARCH ; do printf "$i-softmmu " ; done)"
@@ -111,16 +109,15 @@ make install \
cp -a kvm/kvm_stat $PKG/usr/bin/
mkdir -p $PKG/lib/udev/rules.d/
-cat kvm/scripts/65-kvm.rules > $PKG/lib/udev/rules.d/65-kvm.rules
+sed "s/@GROUP@/$KVMGROUP/" kvm/scripts/65-kvm.rules \
+ > $PKG/lib/udev/rules.d/65-kvm.rules
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- find . -type f -exec chmod 0644 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+find $PKG/usr/man -type f -exec chmod 0644 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a kvm/scripts $PKG/usr/doc/$PRGNAM-$VERSION/