audio/horgand: License and capability support added.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
B. Watson 2013-01-01 13:19:41 -05:00 committed by dsomero
parent 0f6b36715a
commit 5359826b7b
3 changed files with 18 additions and 1 deletions

View file

@ -4,3 +4,9 @@ types like Electric Pianos, Jazz Guitar, Strings, Brass, Fretless Bass,
Accordion etc. using low CPU resources.
This requires fltk and jack-audio-connection-kit.
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

@ -4,9 +4,11 @@
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details.
PRGNAM=horgand
VERSION=${VERSION:-1.14}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -84,5 +86,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}

1
audio/horgand/setcap.sh Normal file
View file

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