aboutsummaryrefslogtreecommitdiff
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.SlackBuild38
1 files changed, 21 insertions, 17 deletions
diff --git a/system/qemu-kvm/qemu-kvm.SlackBuild b/system/qemu-kvm/qemu-kvm.SlackBuild
index e5f6b7f898e7b..dcaddee738db6 100644
--- a/system/qemu-kvm/qemu-kvm.SlackBuild
+++ b/system/qemu-kvm/qemu-kvm.SlackBuild
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=qemu-kvm
-VERSION=${VERSION:-1.0.1}
+VERSION=${VERSION:-1.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,24 +70,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fixup udev rules file to remove NAME="%k" and allow use of a different group
-patch -p1 < $CWD/patches/fixup_udev_rules.patch
-
-# Fix build on recent kernels
-patch -p1 < $CWD/patches/deprecate-time-drift-fix.patch
-
-# Disable debug (hardcoded) and remove double CFLAGS
-sed -i "s|^CFLAGS=\"-g\ |CFLAGS=\"|" configure
-sed -i "s|^LDFLAGS=\"-g\ |LDFLAGS=\"|" configure
+# Remove double CFLAGS
sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure
-# check if spice support is enabled
+# check if spice is there
if pkg-config --exists spice-server ; then
with_spice="--enable-spice"
else
with_spice="--disable-spice"
fi
+# check if usbredir is there
+if pkg-config --exists libusbredirhost ; then
+ with_usbredir="--enable-usb-redir"
+else
+ with_usbredir="--disable-usb-redir"
+fi
+
# The script builds only the 32/64 bit x86 compatible Linux Target CPU emulator.
# If you need to emulate other available architectures you should install the
# "qemu" package, not the "qemu-kvm" package. This package will only be useful
@@ -101,8 +100,11 @@ CFLAGS="$SLKCFLAGS" \
--enable-mixemu \
--audio-drv-list=alsa,oss,sdl,esd \
--enable-system \
+ --with-confsuffix=/qemu-kvm \
+ --disable-debug-info \
--target-list="x86_64-softmmu" \
- $with_spice
+ $with_spice \
+ $with_usbredir
make V=1 \
OS_CFLAGS="$SLKCFLAGS" \
@@ -117,12 +119,11 @@ make install \
# regular "qemu" package won't overwrite it.
mv $PKG/usr/bin/qemu-system-x86_64 $PKG/usr/bin/qemu-kvm
-# Copy a missed binary
-cp -a kvm/kvm_stat $PKG/usr/bin/
+# Copy some missed binaries
+cp -a scripts/kvm/{kvm_stat,kvm_flightrecorder,vmxcap} $PKG/usr/bin/
mkdir -p $PKG/lib/udev/rules.d/
-sed "s/@GROUP@/$KVMGROUP/" kvm/scripts/65-kvm.rules \
- > $PKG/lib/udev/rules.d/65-kvm.rules
+sed "s/@GROUP@/$KVMGROUP/" $CWD/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
@@ -132,7 +133,10 @@ 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/
+mv $PKG/usr/share/doc/qemu/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -fR $PKG/usr/share/doc
+cp -a Changelog COPYING* HACKING LICENSE README TODO docs/* \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install