aboutsummaryrefslogtreecommitdiff
path: root/audio/seq24/seq24.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/seq24/seq24.SlackBuild')
-rw-r--r--audio/seq24/seq24.SlackBuild31
1 files changed, 22 insertions, 9 deletions
diff --git a/audio/seq24/seq24.SlackBuild b/audio/seq24/seq24.SlackBuild
index 39df07766b49..05c62fd225d3 100644
--- a/audio/seq24/seq24.SlackBuild
+++ b/audio/seq24/seq24.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for seq24
# Copyright 2010 Arik Miller <milleraa@msoe.edu>
+# Copyright 2019 Johannes Schoepfer, Germany
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +24,16 @@
# YOUR DATA IS DESTROYED.
PRGNAM=seq24
-VERSION=${VERSION:-rev136}
+VERSION=${VERSION:-0.9.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -40,8 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -59,9 +62,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM/trunk
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM/trunk
+rm -rf $PRGNAM-$VERSION
+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 \
@@ -71,10 +74,10 @@ find -L . \
autoreconf -i
-patch -p2 < $CWD/perfedit.patch
+patch -p1 < $CWD/01-mutex.patch
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -O2 -std=c++11" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -100,6 +103,16 @@ cat $CWD/$PRGNAM.SlackBuild > /$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+# Only add capability stuff if not disabled:
+if [ "${SETCAP:-yes}" = "yes" ]; then
+ # set realtime capabilities
+ echo "/sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/seq24" \
+ >> $PKG/install/doinst.sh
+ # Only allow execution by audio group
+ chown root:audio $PKG/usr/bin/*
+ chmod 0750 $PKG/usr/bin/*
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}