# Give all binaries in the package realtime capabilities when they # link to Jack2 (thanks to SBO's Johannes Schoepfer and Arik Miller): if [ -x /sbin/setcap ]; then CBINS=( $(cd $PKG/usr/bin ; find . -type f -exec file '{}' + |grep " ELF .* executable, " |cut -f 1 -d : |cut -d/ -f2 |xargs printf '"%s"\n') ) for EXE in "\${CBINS[@]}" ; do if [ -n "\$(readelf -d usr/bin/\$EXE | grep libjack.so)" ]; then /sbin/setcap cap_ipc_lock,cap_sys_nice=ep "usr/bin/\$EXE" fi done fi if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 fi fi # Update the mime database: if [ -x usr/bin/update-mime-database ]; then chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi