audio/setBfree: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Johannes Schoepfer 2020-01-31 23:36:42 +07:00 committed by Willy Sudiarto Raharjo
parent c343ae74e3
commit d2bd6bd050
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 16 additions and 13 deletions

View file

@ -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.

View file

@ -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
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
done
fi
cd $PKG
if [ "${SETCAP:-yes}" = "yes" ]; then
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
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}