diff options
Diffstat (limited to 'audio/setBfree/setBfree.SlackBuild')
-rw-r--r-- | audio/setBfree/setBfree.SlackBuild | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/audio/setBfree/setBfree.SlackBuild b/audio/setBfree/setBfree.SlackBuild index 6e2ea8c4baff2..5b26b1a6c2e38 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} |