summaryrefslogtreecommitdiffstats
path: root/audio/qjackctl/qjackctl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/qjackctl/qjackctl.SlackBuild')
-rw-r--r--audio/qjackctl/qjackctl.SlackBuild101
1 files changed, 58 insertions, 43 deletions
diff --git a/audio/qjackctl/qjackctl.SlackBuild b/audio/qjackctl/qjackctl.SlackBuild
index 16a3ccedbd..af5c1eb6ce 100644
--- a/audio/qjackctl/qjackctl.SlackBuild
+++ b/audio/qjackctl/qjackctl.SlackBuild
@@ -1,10 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for "qjackctl".
# Copyright 2009, Erik W. Hanson, Minneapolis, MN, USA
# Copyright 2012, James M. Brewster, Baltimore, MD, USA
-# Copyright 2014-2016 Marcel Saegebarth <marc@mos6581.de>
+# Copyright 2014-2016 Marcel Saegebarth <email removed>
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +25,34 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20231121 bkw: update for v0.9.12, enable SETCAP=yes by default (no idea
+# why it was disabled in the first place).
+
+# 20230106 bkw: update for v0.9.9.
+# 20220614 bkw: update for v0.9.7.
+
+# 20211126 bkw:
+# - update for v0.9.5.
+# - use cmake (got reports that autotools builds don't run correctly).
+# - get rid of 14.2 french man page support.
+# - actually use SLKCFLAGS.
+# - old-style icon (symlink really).
+
+# 20210306 bkw: update for v0.9.1.
+# 20201218 bkw: update for v0.9.0.
+
+# 20200204 bkw:
+# - take over maintenance
+# - update for v0.6.1
+# - fix French man page
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=qjackctl
-VERSION=${VERSION:-0.4.5}
+VERSION=${VERSION:-0.9.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,23 +62,24 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# cmake's gotten smart enough to deduce lib/lib64, so no need for LIBDIRSUFFIX.
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -eu
@@ -65,41 +91,30 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-# Tell qmake about our SLKCFLAGS. Required to compile on x86_64
-# system. Thanks to Lyle Sigurdson <lyle@sent.com> on
-# linuxquestions.org for this patch.
-echo "QMAKE_CXXFLAGS_RELEASE=$SLKCFLAGS" >> qjackctl.pro.in
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-# Make sure we have a standard-compliant desktop file
-cat $CWD/qjackctl.desktop > $PKG/usr/share/applications/qjackctl.desktop
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+SLKCFLAGS+=" -DNDEBUG"
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install/strip DESTDIR=$PKG
+cd ..
+
+gzip $PKG/usr/man/*/man1/* $PKG/usr/man/man1/*
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/32x32/apps/org.rncbc.qjackctl.png \
+ $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL README TODO TRANSLATORS \
+cp -a ChangeLog README LICENSE \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -108,7 +123,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Only add capability stuff if not disabled:
-if [ "${SETCAP:-no}" = "yes" ]; then
+if [ "${SETCAP:-yes}" = "yes" ]; then
cat $CWD/setcap.sh >> $PKG/install/doinst.sh
# Only allow execution by audio group
chown root:audio $PKG/usr/bin/*
@@ -116,4 +131,4 @@ if [ "${SETCAP:-no}" = "yes" ]; then
fi
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE