audio/darkice: Added optional realtime capabilities.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Marcel Saegebarth 2014-10-13 06:17:23 +07:00 committed by Willy Sudiarto Raharjo
parent cd586e983e
commit 46a410d0f6
3 changed files with 17 additions and 1 deletions

View File

@ -27,4 +27,11 @@ DarkIce can send the encoded stream to the following streaming servers:
- Darwin Streaming Server
- archive the encoded audio in files
Note:
This package optionally 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 enable
capabilities, pass SETCAP=yes to the script.
Optional dependencies: lame, opus, faac, twolame, jack-audio-connection-kit, pulseaudio

View File

@ -25,7 +25,7 @@
PRGNAM=darkice
VERSION=${VERSION:-1.2}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -96,5 +96,13 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# Only add capability stuff if not disabled:
if [ "${SETCAP:-no}" = "yes" ]; then
cat $CWD/setcap.sh >> $PKG/install/doinst.sh
# Only allow execution by audio group
chown root:audio $PKG/usr/bin/darkice
chmod 0750 $PKG/usr/bin/darkice
fi
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

1
audio/darkice/setcap.sh Normal file
View File

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