From 552fad9c44172c348117cc46f01949e7dc556ddb Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 4 Nov 2015 17:25:34 -0500 Subject: [PATCH] audio/tap_plugins: Updated for version 0.7.3, add desktop/setcap. --- audio/tap_plugins/README | 6 +++ audio/tap_plugins/doinst.sh | 4 ++ .../tap_plugins/reverbed-default-config.diff | 26 +++++++++++ audio/tap_plugins/reverbed.desktop | 7 +++ audio/tap_plugins/reverbed.png | Bin 0 -> 5752 bytes audio/tap_plugins/reverbed.sh | 14 ------ audio/tap_plugins/setcap.sh | 1 + audio/tap_plugins/tap_plugins.SlackBuild | 44 ++++++++++++++---- audio/tap_plugins/tap_plugins.info | 10 ++-- 9 files changed, 83 insertions(+), 29 deletions(-) create mode 100644 audio/tap_plugins/doinst.sh create mode 100644 audio/tap_plugins/reverbed-default-config.diff create mode 100644 audio/tap_plugins/reverbed.desktop create mode 100644 audio/tap_plugins/reverbed.png delete mode 100644 audio/tap_plugins/reverbed.sh create mode 100644 audio/tap_plugins/setcap.sh diff --git a/audio/tap_plugins/README b/audio/tap_plugins/README index bf30ff221f..8f7fb5c59b 100644 --- a/audio/tap_plugins/README +++ b/audio/tap_plugins/README @@ -7,3 +7,9 @@ echo, eq, limiter & more. This package includes the main tap-plugins distribution, plus the tap-plugins-doc and tap-reverbed (TAP Reverb Editor) distributions. + +This package uses POSIX filesystem capabilities to execute with +elevated privileges (required for realtime audio processing). This +may be considered a security/stability risk. Please read +http://www.slackbuilds.org/caps/ for more information. To disable +capabilities, pass SETCAP=no to the script. diff --git a/audio/tap_plugins/doinst.sh b/audio/tap_plugins/doinst.sh new file mode 100644 index 0000000000..696d35bad7 --- /dev/null +++ b/audio/tap_plugins/doinst.sh @@ -0,0 +1,4 @@ + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/audio/tap_plugins/reverbed-default-config.diff b/audio/tap_plugins/reverbed-default-config.diff new file mode 100644 index 0000000000..e9df247d25 --- /dev/null +++ b/audio/tap_plugins/reverbed-default-config.diff @@ -0,0 +1,26 @@ +diff -Naur tap-reverbed-r0/src/file_io.c tap-reverbed-r0.patched/src/file_io.c +--- tap-reverbed-r0/src/file_io.c 2004-06-18 07:19:01.000000000 -0400 ++++ tap-reverbed-r0.patched/src/file_io.c 2015-11-04 16:11:02.000000000 -0500 +@@ -62,6 +62,8 @@ + } + + ++/* default config, used as fallback if ~/.reverbed not found */ ++#define SYS_REVERBED "/etc/reverbed/reverbed.conf" + + REVTYPE * + parse_input_file(void) { +@@ -85,8 +87,11 @@ + home = "."; + sprintf(path, "%s/%s", home, NAME_REVERBED); + if ((infile = fopen(path,"rt")) == NULL) { +- fprintf(stderr, "Unable to open %s\n", path); +- return(NULL); ++ fprintf(stderr, "Unable to open %s, trying %s\n", path, SYS_REVERBED); ++ if ((infile = fopen(SYS_REVERBED ,"rt")) == NULL) { ++ fprintf(stderr, "Unable to open %s", SYS_REVERBED); ++ return(NULL); ++ } + } + + if ((root = malloc(sizeof(REVTYPE))) == NULL) { diff --git a/audio/tap_plugins/reverbed.desktop b/audio/tap_plugins/reverbed.desktop new file mode 100644 index 0000000000..1bce528106 --- /dev/null +++ b/audio/tap_plugins/reverbed.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=TAP Reverb Editor +Exec=reverbed +Terminal=false +Type=Application +Categories=AudioVideo;Audio; +Icon=reverbed diff --git a/audio/tap_plugins/reverbed.png b/audio/tap_plugins/reverbed.png new file mode 100644 index 0000000000000000000000000000000000000000..ba3af7ecc5c17032d031076b5e22f9425fd6ee84 GIT binary patch literal 5752 zcmZ9QWmFVS*!GvdxUfNpG$Kluuyl7L4bt7+EhvhVg0S>TgM_qnh;&MaNJ}Fnps<86 zFVA^DJ^P4l*#FslpOGAkOP7Q}ZAOtGP@;bMwaog?i@7%^|I;Qzs!F7;P zmw`Y&$0Pn(-M!5p*(mF%LmKx`~{`4ag00#{dHX9qkzfwwnsb_Q?X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i*4*OcI(G_e9E9>D&j_B~6^%)6JA(mAT8`80Q*&10{o<()jA z>nfZd#z{2r6&ODBxHva)XkmS+Zp!Y`maV!_2Jhp99X)x=qqa9$AHF#Hl98*m&UNf3 z$7JQ3*dUo|<7fLm@8ZH)p0|Qz#{iYx*kyz6!A{4lQA@pkZ1ZWGjlsm@-H{&tDJR^^ zXl^2tq)wiMF`+-9W7klgqxrmL`=b}uxzwITZ%w$LGN72WlUh05ctgk9yRNU&Sl@L< z1RprIYcUQEG+00tjojr6xV8wBCz|l2UL1axBJm*k<`on5MyKWuy_h`ECe!KT!^xUr zDxo1r(7PG)SiUcGc!44D%Kr4xW#7o`(M;xc_CIrS=QNLj{>(n8LKfm8VxJFbbJi4gDZ2Hh|sri6~K~ z(L`k7(5V5rzCwy&}R7YADx61bW9sR@L2s(|}dj7w4l4#Ok>`V@+{_DCSae0kOI4WZmLa znGs8$73gFo07nqVZ==$c8%yp@w-M7gH3*ET@zt)E7VnQX3Eq|YPjuIQ0Xu*zv9BM< zUrCzjZ*QPP4yT71ZcJTW1<$f@+?-Z?UE&E!VH5EpuM3^Omt6Id~BVDP{-a@T&8Q$xu=)Tx$ zeUfmSP`9uwdkI-p|)elSFDZ*V; z9Lq|bmFA+<5qEC(Am%DcNU+k))l~Fs>(gEi5c_D50`BJRu2muTLRfBVWK6yahQ78| zzILKE-gdVF;YINXJmKMag5uZX5fl~R5k;Y%pagCs*_V3v{{^^t*gDw<{a*kj$|wB) V0YN!#$6ElRqM#vPDQo%q{{hEk9+Ln7 literal 0 HcmV?d00001 diff --git a/audio/tap_plugins/reverbed.sh b/audio/tap_plugins/reverbed.sh deleted file mode 100644 index b1cb7c2cfe..0000000000 --- a/audio/tap_plugins/reverbed.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Wrapper script for reverbed. When reverbed is run, it requires its -# config file to already be present in the user's home directory. If not, -# it'll exit, printing a message on the terminal... but if the user launched -# it via an icon from a desktop environment, he won't see the error (it will -# appear to silently fail to run). To avoid confusion, this script creates -# the config file if & only if it doesn't already exist. - -if [ ! -e ~/.reverbed ]; then - cat /usr/doc/tap_plugins-@VERSION@/dot.reverbed.default > ~/.reverbed -fi - -exec /usr/bin/reverbed.bin diff --git a/audio/tap_plugins/setcap.sh b/audio/tap_plugins/setcap.sh new file mode 100644 index 0000000000..2ae0f9bd07 --- /dev/null +++ b/audio/tap_plugins/setcap.sh @@ -0,0 +1 @@ +[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/reverbed diff --git a/audio/tap_plugins/tap_plugins.SlackBuild b/audio/tap_plugins/tap_plugins.SlackBuild index 2a23d2e3d1..1ead88e9fc 100644 --- a/audio/tap_plugins/tap_plugins.SlackBuild +++ b/audio/tap_plugins/tap_plugins.SlackBuild @@ -6,9 +6,15 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20151104 bkw: +# update for v0.7.3, update docs to 20140526 +# get rid of reverbed.sh wrapper script (patch reverbed instead) +# add capability stuff for reverbed +# add .desktop, icon for reverbed + PRGNAM=tap_plugins -VERSION=${VERSION:-0.7.2} -BUILD=${BUILD:-2} +VERSION=${VERSION:-0.7.3} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -45,7 +51,7 @@ FORCE_SYSTEM_LADSPA_H=${FORCE_SYSTEM_LADSPA_H:-no} PLUGINS_SRCNAM=tap-plugins DOCS_SRCNAM=tap-plugins-doc -DOCS_VERSION=20040817 +DOCS_VERSION=20140526 REVERBED_SRCNAM=tap-reverbed REVERBED_VERSION=r0 @@ -97,6 +103,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# patch by SlackBuild author, makes reverbed load its config from /etc +# if no ~/.reverbed found (rather than aborting with an error message). +patch -p1 < $CWD/reverbed-default-config.diff + ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -113,14 +123,19 @@ fi make LIBS=-lm # more trouble than it's worth to get 'make install' to handle DESTDIR -strip src/reverbed -mkdir -p $PKG/usr/bin -cp src/reverbed $PKG/usr/bin/reverbed.bin -cat src/.reverbed > $PKG/usr/doc/$PRGNAM-$VERSION/dot.reverbed.default +mkdir -p $PKG/usr/bin $PKG/etc/reverbed +install -s -m0755 -oroot -groot src/reverbed $PKG/usr/bin/ +cat src/.reverbed > $PKG/etc/reverbed/reverbed.conf -# Shell script wrapper -sed 's/@VERSION@/'$VERSION'/g' < $CWD/reverbed.sh > $PKG/usr/bin/reverbed -chmod 0755 $PKG/usr/bin/reverbed +# icon came from: +# https://www.hscripts.com/freeimages/icons/mechanical/spring-clipart.php +# and turned into a PNG via ImageMagick's convert. +mkdir -p $PKG/usr/share/pixmaps +cat $CWD/reverbed.png > $PKG/usr/share/pixmaps/reverbed.png + +# .desktop written by SlackBuild author +mkdir -p $PKG/usr/share/applications +cat $CWD/reverbed.desktop > $PKG/usr/share/applications/reverbed.desktop # ChangeLog and NEWS are 0-length placeholders for i in AUTHORS COPYING README; do @@ -143,6 +158,15 @@ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo 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/reverbed + chmod 0750 $PKG/usr/bin/reverbed +fi cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/tap_plugins/tap_plugins.info b/audio/tap_plugins/tap_plugins.info index 6599b1b3a1..d6793981fc 100644 --- a/audio/tap_plugins/tap_plugins.info +++ b/audio/tap_plugins/tap_plugins.info @@ -1,12 +1,12 @@ PRGNAM="tap_plugins" -VERSION="0.7.2" +VERSION="0.7.3" HOMEPAGE="http://tap-plugins.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/project/tap-plugins/tap-plugins/0.7.2/tap-plugins-0.7.2.tar.gz \ +DOWNLOAD="http://downloads.sourceforge.net/project/tap-plugins/tap-plugins/0.7.3/tap-plugins-0.7.3.tar.gz \ http://downloads.sourceforge.net/project/tap-plugins/tap-reverbed/Release%200/tap-reverbed-r0.tar.gz \ - http://downloads.sourceforge.net/project/tap-plugins/tap-plugins-doc/2004-08-17/tap-plugins-doc-20040817.tar.gz" -MD5SUM="354b171e580cfad6bad87c26a79ef273 \ + http://downloads.sourceforge.net/project/tap-plugins/tap-plugins-doc/2014-05-26/tap-plugins-doc-20140526.tar.gz" +MD5SUM="113fa021b2a05e2fd3cf35f65e6ca137 \ f8b15df131b45d2d5ef2e8d7c34e9a29 \ - 9a320210a7a9417487ceb31d6e5c21be" + 8af9ad9be0aac9f577056311d7ebbd5e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="jack-audio-connection-kit ladspa_sdk"