summaryrefslogtreecommitdiffstats
path: root/audio/mpd/mpd.SlackBuild
diff options
context:
space:
mode:
author Robby Workman2010-05-21 08:43:50 +0200
committer Robby Workman2010-05-21 08:43:50 +0200
commit94ab93443ccdec7963cb006fa52b6ffd38776fab (patch)
tree044cd03af15c2cdb3f5f4e41821fd002b7f00b16 /audio/mpd/mpd.SlackBuild
parentf3e6135fae02c571126fe6a282389d74394eb8d0 (diff)
downloadslackbuilds-94ab93443ccdec7963cb006fa52b6ffd38776fab.tar.gz
audio/mpd: Miscellaneous cleanups.
Diffstat (limited to 'audio/mpd/mpd.SlackBuild')
-rw-r--r--audio/mpd/mpd.SlackBuild19
1 files changed, 14 insertions, 5 deletions
diff --git a/audio/mpd/mpd.SlackBuild b/audio/mpd/mpd.SlackBuild
index c2e3620004..769e5832cc 100644
--- a/audio/mpd/mpd.SlackBuild
+++ b/audio/mpd/mpd.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=mpd
VERSION=0.15.9
-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-mpd
@@ -42,6 +51,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -73,10 +85,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
# Use sample config, without overwriting
install -D -m 644 doc/mpdconf.example $PKG/etc/mpd.conf.new
-( cd $PKG/usr/man || exit 1
- 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