aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/horgand/README6
-rw-r--r--audio/horgand/horgand.SlackBuild12
-rw-r--r--audio/horgand/setcap.sh1
3 files changed, 18 insertions, 1 deletions
diff --git a/audio/horgand/README b/audio/horgand/README
index e3a8d58e2933..a40f76c3e2a7 100644
--- a/audio/horgand/README
+++ b/audio/horgand/README
@@ -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.
diff --git a/audio/horgand/horgand.SlackBuild b/audio/horgand/horgand.SlackBuild
index e2b26c730281..468ca3a3dafd 100644
--- a/audio/horgand/horgand.SlackBuild
+++ b/audio/horgand/horgand.SlackBuild
@@ -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}
diff --git a/audio/horgand/setcap.sh b/audio/horgand/setcap.sh
new file mode 100644
index 000000000000..28585e5c9022
--- /dev/null
+++ b/audio/horgand/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/horgand