diff options
author | Johannes Schoepfer <slackbuilds@schoepfer.info> | 2020-01-31 23:36:42 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-01-31 23:36:42 +0700 |
commit | d2bd6bd050484efe2405541e5d90daef3bd5fcaa (patch) | |
tree | 6f5a0bc2adef30518d7778dd9db55b6a434baedd /audio/setBfree/setBfree.SlackBuild | |
parent | c343ae74e3658c85b9bd05c4551d325c42eb2e2b (diff) |
audio/setBfree: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
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 6e2ea8c4baff..5b26b1a6c2e3 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} |