diff options
-rw-r--r-- | audio/setBfree/README | 2 | ||||
-rw-r--r-- | audio/setBfree/setBfree.SlackBuild | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/audio/setBfree/README b/audio/setBfree/README index ec98662a6c..c4f3f994b2 100644 --- a/audio/setBfree/README +++ b/audio/setBfree/README @@ -3,8 +3,6 @@ and properties of the electromechanical organs and sound modification devices that brought world-wide fame to the names and products of Laurens Hammond and Don Leslie. -This requires one of the jack varieties. - Optional dependencies are lv2,liblo and ftgl to build the standalone and lv2 OpenGL UI: For the LV2 GUI you need a LV2 host with Gtk support, like jalv. diff --git a/audio/setBfree/setBfree.SlackBuild b/audio/setBfree/setBfree.SlackBuild index 6e2ea8c4ba..5b26b1a6c2 100644 --- a/audio/setBfree/setBfree.SlackBuild +++ b/audio/setBfree/setBfree.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for setBfree -# Copyright 2019 Johannes Schoepfer, Germany +# Copyright 2020 Johannes Schoepfer, Germany # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -103,15 +103,20 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cd $PKG if [ "${SETCAP:-yes}" = "yes" ]; then - for bin in $(ls $PKG/usr/bin/); do - if [ $(readelf -d $PKG/usr/bin/$bin | grep libjack.so &> /dev/null) ]; then - echo "/sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/$bin" >> $PKG/install/doinst.sh - chown root:audio $PKG/usr/bin/$bin - chmod 0750 $PKG/usr/bin/$bin - fi + for bin in $(find . -type f -exec file '{}' + | grep " ELF .* executable, " | cut -f 1 -d : ); do + [ -n "$(readelf -d $bin | grep libjack.so)" ] && \ + jackbin+=" $bin" && chown root:audio $PKG/$bin && chmod 0750 $PKG/$file done + if [ -n "$jackbin" ]; then + cat <<- EOF >> $PKG/install/doinst.sh + if [ -x /sbin/setcap ]; then + for file in$jackbin; do + /sbin/setcap cap_ipc_lock,cap_sys_nice=ep \$file + done + fi + EOF + fi fi - -cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |