aboutsummaryrefslogtreecommitdiff
path: root/system/qemu/qemu.SlackBuild
diff options
context:
space:
mode:
authorAndrew Brouwers <abrouwers@gmail.com>2010-05-12 17:45:54 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:45:54 +0200
commit88c78f361484658976fda203a1fc5f47b691e3f0 (patch)
tree0e692b661e4be8b161f82cc937047aedec3e36e6 /system/qemu/qemu.SlackBuild
parent82f6f6be69f63cc6e2fb7a70cd393b646c69029f (diff)
system/qemu: Updated for version 0.10.5
Diffstat (limited to 'system/qemu/qemu.SlackBuild')
-rw-r--r--system/qemu/qemu.SlackBuild62
1 files changed, 47 insertions, 15 deletions
diff --git a/system/qemu/qemu.SlackBuild b/system/qemu/qemu.SlackBuild
index eb12a0225be20..03061439475cc 100644
--- a/system/qemu/qemu.SlackBuild
+++ b/system/qemu/qemu.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for qemu-bin
+# Slackware build script for qemu
-# Copyright 2006 Andrew Brouwers <abrouwers@gmail.com>
+# Copyright 2009 Andrew Brouwers <abrouwers@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,32 +25,64 @@
# Modified by the SlackBuilds.org project
PRGNAM=qemu
-VERSION=0.9.1
-ARCH=i386 # Leave be for binary
-BUILD=${BUILD:-2}
+VERSION=0.10.5
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=${PKG:-/tmp/SBo/package-$PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
+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 $PKG || exit 1
-tar xvfz $CWD/$PRGNAM-$VERSION-$ARCH.tar.gz || exit 1
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-mv $PKG/usr/local/share/man $PKG/usr/man
-mv $PKG/usr/local/bin $PKG/usr/bin
+# --libdir isn't recognized and isn't needed anyway
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-system \
+ --audio-drv-list=oss,alsa,sdl,esd
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mv $PKG/usr/share/man $PKG/usr/
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/local/share/doc/qemu/* $PKG/usr/doc/$PRGNAM-$VERSION
+cp TODO README LICENSE COPYING COPYING.LIB MAINTAINERS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/qemu/* $PKG/usr/doc/$PRGNAM-$VERSION/
+rm -rf $PKG/usr/share/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
-mv $PKG/usr/local/share $PKG/usr/share
-rm -rf $PKG/usr/local $PKG/usr/share/doc
-
-gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc