summaryrefslogtreecommitdiff
path: root/audio/jack_capture/jack_capture.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/jack_capture/jack_capture.SlackBuild')
-rw-r--r--audio/jack_capture/jack_capture.SlackBuild68
1 files changed, 45 insertions, 23 deletions
diff --git a/audio/jack_capture/jack_capture.SlackBuild b/audio/jack_capture/jack_capture.SlackBuild
index a572eba0f0..bd06474ddb 100644
--- a/audio/jack_capture/jack_capture.SlackBuild
+++ b/audio/jack_capture/jack_capture.SlackBuild
@@ -1,9 +1,32 @@
#!/bin/sh
-# Slackware build script for <jack_capture>
-# Written by Michales Michaloudes korgie@gmail.com
+
+# Slackware build script for "jack_capture".
+
+# Copyright -2015 Michales Michaloudes <korgie@gmail.com>
+# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=jack_capture
-VERSION=${VERSION:-0.9.57}
+VERSION=${VERSION:-0.9.71}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -40,44 +63,43 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
+ \( -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 {} \;
-# prefix correction
-sed -i -e 's+/usr/local+/usr+g' Makefile
-
-# compile flags correction
sed -i -e "s/OPTIMIZE=-O3.*/OPTIMIZE=${SLKCFLAGS}/g" Makefile
make
-make install DESTDIR=$PKG
+make install PREFIX=/usr 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
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cd $TMP/$PRGNAM-$VERSION/
-cp -a \
- COPYING README \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-# cp KDE desktop icon
mkdir -p $PKG/usr/share/applications
cat $CWD/${PRGNAM}_gui2.desktop > $PKG/usr/share/applications/${PRGNAM}_gui2.desktop
mkdir -p $PKG/usr/share/${PRGNAM}_gui2
-install -m0644 -oroot $CWD/$PRGNAM*.xpm $PKG/usr/share/${PRGNAM}_gui2/
+install -m 0644 $CWD/$PRGNAM*.xpm $PKG/usr/share/${PRGNAM}_gui2/
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README TODO config $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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:-yes}" = "yes" ]; then
+ cat $CWD/setcap.sh >> $PKG/install/doinst.sh
+ # Only allow execution by audio group
+ chown root:audio $PKG/usr/bin/*
+ chmod 0750 $PKG/usr/bin/*
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}