summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-03-11 14:42:30 +0000
committer Eric Hameleers <alien@slackware.com>2020-03-11 14:42:30 +0000
commitaea6a31f34256f1407eb065788ca973c872bdf25 (patch)
tree9122e1eb1c02639e7d4171507f9f7c3d561ca7c1
parent8ba5f305123bc9551b3a23ac3e2f2092624bbf6e (diff)
downloadasb-aea6a31f34256f1407eb065788ca973c872bdf25.tar.gz
asb-aea6a31f34256f1407eb065788ca973c872bdf25.tar.xz
qjackctl: updated to 0.6.1
Limit execution to users in the 'audio' group and set realtime capabilities
-rwxr-xr-xqjackctl/build/qjackctl.SlackBuild31
1 files changed, 27 insertions, 4 deletions
diff --git a/qjackctl/build/qjackctl.SlackBuild b/qjackctl/build/qjackctl.SlackBuild
index 42d0095c..a1e61223 100755
--- a/qjackctl/build/qjackctl.SlackBuild
+++ b/qjackctl/build/qjackctl.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2009, 2013, 2019 Eric Hameleers, Eindhoven, NL
+# Copyright 2009, 2013, 2019, 2020 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,6 +36,8 @@
# * Update.
# 0.5.5-1: 01/mar/2019 by Eric Hameleers <alien@slackware.com>
# * Update.
+# 0.6.1-1: 11/mar/2020 by Eric Hameleers <alien@slackware.com>
+# * Update.
#
# Run 'sh qjackctl.SlackBuild' to build a Slackware package.
# The package (.txz) and .txt file as well as build logs are created in /tmp .
@@ -46,7 +48,7 @@
# Set initial variables:
PRGNAM=qjackctl
-VERSION=${VERSION:-0.5.5}
+VERSION=${VERSION:-0.6.1}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
@@ -62,7 +64,7 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
+SRCURL="https://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -158,6 +160,9 @@ chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
echo Building ...
+touch $OUTPUT/configure-${PRGNAM}.log
+[ ! -x configure ] && autoreconf -vif \
+ 2>&1 | tee -a $OUTPUT/configure-${PRGNAM}.log
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
@@ -170,19 +175,37 @@ CFLAGS="$SLKCFLAGS" \
--program-prefix= \
--program-suffix= \
--build=$TARGET \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+ 2>&1 | tee -a $OUTPUT/configure-${PRGNAM}.log
make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
+# Only allow execution by user in 'audio' group:
+chown root:audio $PKG/usr/bin/*
+chmod 0750 $PKG/usr/bin/*
+
# Add this to the doinst.sh:
! [ -d $PKG/install ] && mkdir -p $PKG/install
cat <<EOT >> $PKG/install/doinst.sh
+if [ -x /sbin/setcap ]; then
+ # Give all binaries in the package realtime capabilities:
+ JACKBINS=( $(cd $PKG/usr/bin ; find . -type f -printf '%P\n') )
+ for EXE in \${JACKBINS[@]}; do
+ /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/\$EXE
+ done
+fi
+
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database 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 -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
EOT
# Add documentation: