summaryrefslogtreecommitdiff
path: root/audio/rakarrack/rakarrack.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-01-15 12:42:49 +0700
committerErik Hanson <erik@slackbuilds.org>2014-01-29 23:21:03 -0600
commita694bc59e79994a365d884e8a4217c984d8644e7 (patch)
tree418b99b0876881c31176e76583b8320e0c5c2629 /audio/rakarrack/rakarrack.SlackBuild
parent111738dc2ae3138d1ab09ea4bdc926c271c22d27 (diff)
downloadslackbuilds-a694bc59e79994a365d884e8a4217c984d8644e7.tar.gz
audio/rakarrack: Fix distortion on x86_64.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/rakarrack/rakarrack.SlackBuild')
-rw-r--r--audio/rakarrack/rakarrack.SlackBuild28
1 files changed, 21 insertions, 7 deletions
diff --git a/audio/rakarrack/rakarrack.SlackBuild b/audio/rakarrack/rakarrack.SlackBuild
index 25540134c6..9268c8fff9 100644
--- a/audio/rakarrack/rakarrack.SlackBuild
+++ b/audio/rakarrack/rakarrack.SlackBuild
@@ -6,9 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20140114 bkw: add 64-bit distortion fix and setcap stuff.
+
PRGNAM=rakarrack
VERSION=${VERSION:-0.6.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -48,10 +50,15 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# work around a bug that causes distorion/overdrive not to work on 64-bit.
+# this is a band-aid, not a real solution, but it seems to work OK.
+# http://sourceforge.net/p/rakarrack/discussion/778862/thread/e9559a34/
+patch -p1 < $CWD/64bit_distortion.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -70,8 +77,7 @@ gzip $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog NEWS README TODO \
+cp -a AUTHORS COPYING ChangeLog NEWS README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -79,5 +85,13 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+# Only add capability stuff if not disabled:
+if [ "${SETCAP:-yes}" = "yes" ]; then
+ cat $CWD/setcap.sh >> $PKG/install/doinst.sh
+ # Only allow execution by audio group
+ chown root:audio $PKG/usr/bin/$PRGNAM
+ chmod 0750 $PKG/usr/bin/$PRGNAM
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}