audio/jack_delay: Updated for version 0.4.2, add capability stuff.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2019-12-02 10:03:04 -05:00 committed by Willy Sudiarto Raharjo
parent 3a84295952
commit 4c55221cdf
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
4 changed files with 26 additions and 11 deletions

View File

@ -5,3 +5,9 @@ about 1/1000 of a sample.
Definitely read the docs in /usr/doc/jack_delay-$VERSION/README to Definitely read the docs in /usr/doc/jack_delay-$VERSION/README to
understand how to use this. 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.

View File

@ -7,7 +7,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=jack_delay PRGNAM=jack_delay
VERSION=${VERSION:-0.4.0} VERSION=${VERSION:-0.4.2}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -43,21 +43,21 @@ set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG/usr/bin $OUTPUT mkdir -p $TMP $PKG/usr/bin $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM rm -rf $PRGNAM $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 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 . chown -R root:root .
find -L . \ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
[ -d source ] && cd source
sed -i "s,-O2,$SLKCFLAGS," Makefile sed -i "s,-O2,$SLKCFLAGS," Makefile
make make
make install PREFIX=$PKG/usr make install PREFIX=$PKG/usr
strip $PKG/usr/bin/* strip $PKG/usr/bin/*
[ -e README ] || cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING README $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 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 mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc 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 cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -1,8 +1,8 @@
PRGNAM="jack_delay" PRGNAM="jack_delay"
VERSION="0.4.0" VERSION="0.4.2"
HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/" HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/"
DOWNLOAD="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/jack_delay-0.4.0.tar.bz2" DOWNLOAD="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/jack_delay-0.4.2.tar.bz2"
MD5SUM="8f61ecf5bc0744bf943c6ad993177a31" MD5SUM="05ddc5a99a7d7d19405c83537fd15044"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="jack-audio-connection-kit" REQUIRES="jack-audio-connection-kit"

View File

@ -0,0 +1 @@
[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/jack_delay