summaryrefslogtreecommitdiffstats
path: root/qemu-kvm
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2011-03-28 22:16:00 +0000
committer Eric Hameleers <alien@slackware.com>2011-03-28 22:16:00 +0000
commit5c58490716355a1e9811fb3f8ac533542d2c8e7e (patch)
treecbdabd1ccf29206205480fa31389433c0ae305de /qemu-kvm
parent25a7b8830a5f8a6ace00c470a4e283564cbef5fb (diff)
downloadasb-5c58490716355a1e9811fb3f8ac533542d2c8e7e.tar.gz
asb-5c58490716355a1e9811fb3f8ac533542d2c8e7e.tar.xz
Take care of a new conf file.
The mandir and docdir can now be passed to configure Apply a fix to make 0.14.0 compile non-pci targets
Diffstat (limited to 'qemu-kvm')
-rwxr-xr-xqemu-kvm/build/qemu-kvm.SlackBuild40
1 files changed, 33 insertions, 7 deletions
diff --git a/qemu-kvm/build/qemu-kvm.SlackBuild b/qemu-kvm/build/qemu-kvm.SlackBuild
index ffb9599e..020d66af 100755
--- a/qemu-kvm/build/qemu-kvm.SlackBuild
+++ b/qemu-kvm/build/qemu-kvm.SlackBuild
@@ -145,10 +145,9 @@ echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
-# Use proper Slackware paths:
-sed -i -e 's#mansuffix="/share/man"#mansuffix="/man"#' \
- -e "s#docsuffix=\"/share/doc/qemu\"#docsuffix=\"/doc/$PRGNAM-$VERSION\"#" \
- configure
+# Fix for build error (0.14.0 only):
+cat $SRCDIR/qemu-kvm.nopci.patch | patch -p1 --verbose 2>&1 \
+ | tee $OUTPUT/patch-$PRGNAM.log
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
@@ -159,6 +158,9 @@ CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-system \
--enable-linux-user \
--target-list="" \
@@ -179,6 +181,32 @@ make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
install -m0775 kvm/kvm_stat $PKG/usr/bin/kvm_stat
+# Add this to the doinst.sh:
+mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+# Handle the incoming configuration files:
+config2() {
+ for infile in \$1; do
+ NEW="\$infile"
+ OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, move the existing file to an .orig extension and let the new
+ # file take its place:
+ mv \$OLD \$OLD.orig
+ mv \$NEW \$OLD
+ done
+}
+
+config2 etc/qemu/target-x86_64.conf.new
+
+EOINS
+
# Add a udev rules file so that members of the 'kvm' group can use the KVM:
mkdir -p $PKG/lib/udev/rules.d/
install -m644 kvm/scripts/65-kvm.rules $PKG/lib/udev/rules.d/65-kvm.rules
@@ -209,9 +237,7 @@ cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
-if [ -f $PKG/install/slack-required ]; then
- cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
-fi
+cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
# Restore the original umask:
umask ${_UMASK_}