From 40f7b4ad0a24b882719322ac7ca76eace8f7bc70 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Wed, 19 May 2010 14:28:44 -0500 Subject: multimedia/gnome-mplayer: Miscellaneous cleanups. --- multimedia/gnome-mplayer/gnome-mplayer.SlackBuild | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'multimedia/gnome-mplayer/gnome-mplayer.SlackBuild') diff --git a/multimedia/gnome-mplayer/gnome-mplayer.SlackBuild b/multimedia/gnome-mplayer/gnome-mplayer.SlackBuild index a103c44131..d1e092396d 100644 --- a/multimedia/gnome-mplayer/gnome-mplayer.SlackBuild +++ b/multimedia/gnome-mplayer/gnome-mplayer.SlackBuild @@ -5,10 +5,19 @@ PRGNAM=gnome-mplayer VERSION=${VERSION:-0.9.8} -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -23,6 +32,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -40,8 +52,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \ -o -perm 400 \) -exec chmod 644 {} \; -patch -p0 < $CWD/GTK2_14.patch - CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -59,10 +69,7 @@ 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 -( 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 -) +find $PKG/usr/man -type f -exec gzip -9 {} \; cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -- cgit v1.2.3