aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/jack_delay/README6
-rw-r--r--audio/jack_delay/jack_delay.SlackBuild24
-rw-r--r--audio/jack_delay/jack_delay.info6
-rw-r--r--audio/jack_delay/setcap.sh1
4 files changed, 26 insertions, 11 deletions
diff --git a/audio/jack_delay/README b/audio/jack_delay/README
index 49d0c27503a6..71b362a7a3aa 100644
--- a/audio/jack_delay/README
+++ b/audio/jack_delay/README
@@ -5,3 +5,9 @@ about 1/1000 of a sample.
Definitely read the docs in /usr/doc/jack_delay-$VERSION/README to
understand how to use this.
+
+This package uses POSIX filesystem capabilities to execute with
+elevated privileges (required for realtime audio processing). This
+may be considered a security/stability risk. Please read
+http://www.slackbuilds.org/caps/ for more information. To disable
+capabilities, pass SETCAP=no to the script.
diff --git a/audio/jack_delay/jack_delay.SlackBuild b/audio/jack_delay/jack_delay.SlackBuild
index 8d961bf18aa4..36a640cfe671 100644
--- a/audio/jack_delay/jack_delay.SlackBuild
+++ b/audio/jack_delay/jack_delay.SlackBuild
@@ -7,7 +7,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=jack_delay
-VERSION=${VERSION:-0.4.0}
+VERSION=${VERSION:-0.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -43,21 +43,21 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG/usr/bin $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+rm -rf $PRGNAM $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM
+# older versions didn't have the source/ dir, this copes with either:
+[ -d $PRGNAM-$VERSION ] && cd $PRGNAM-$VERSION || cd $PRGNAM
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+[ -d source ] && cd source
sed -i "s,-O2,$SLKCFLAGS," Makefile
make
make install PREFIX=$PKG/usr
strip $PKG/usr/bin/*
+[ -e README ] || cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -65,5 +65,13 @@ 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
+ 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}
diff --git a/audio/jack_delay/jack_delay.info b/audio/jack_delay/jack_delay.info
index dae6a251bf1a..c4601cab8807 100644
--- a/audio/jack_delay/jack_delay.info
+++ b/audio/jack_delay/jack_delay.info
@@ -1,8 +1,8 @@
PRGNAM="jack_delay"
-VERSION="0.4.0"
+VERSION="0.4.2"
HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/"
-DOWNLOAD="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/jack_delay-0.4.0.tar.bz2"
-MD5SUM="8f61ecf5bc0744bf943c6ad993177a31"
+DOWNLOAD="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/jack_delay-0.4.2.tar.bz2"
+MD5SUM="05ddc5a99a7d7d19405c83537fd15044"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="jack-audio-connection-kit"
diff --git a/audio/jack_delay/setcap.sh b/audio/jack_delay/setcap.sh
new file mode 100644
index 000000000000..547501eeba6c
--- /dev/null
+++ b/audio/jack_delay/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/jack_delay