diff options
Diffstat (limited to 'audio/tap_plugins/tap_plugins.SlackBuild')
-rw-r--r-- | audio/tap_plugins/tap_plugins.SlackBuild | 81 |
1 files changed, 52 insertions, 29 deletions
diff --git a/audio/tap_plugins/tap_plugins.SlackBuild b/audio/tap_plugins/tap_plugins.SlackBuild index 05aa566856..235af296db 100644 --- a/audio/tap_plugins/tap_plugins.SlackBuild +++ b/audio/tap_plugins/tap_plugins.SlackBuild @@ -1,11 +1,18 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for tap_plugins -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230106 bkw: rearrage stuff so PRINT_PACKAGE_NAME works. + +# 20211201 bkw: update for v1.0.1. +# - fix -current build. +# - new-style icons. +# - man page for reverbed. +# - don't install 2 identical COPYING.* in doc dir. # 20171221 bkw: update for v1.0.0 # 20151104 bkw: @@ -14,12 +21,14 @@ # add capability stuff for reverbed # add .desktop, icon for reverbed +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=tap_plugins -VERSION=${VERSION:-1.0.0} +VERSION=${VERSION:-1.0.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -32,6 +41,11 @@ if [ -z "$ARCH" ]; then esac fi +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -67,11 +81,8 @@ rm -rf $PLUGINS_SRCNAM-$VERSION tar xvf $CWD/$PLUGINS_SRCNAM-$VERSION.tar.gz cd $PLUGINS_SRCNAM-$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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ if [ "$FORCE_SLACK_CFLAGS" = "yes" ]; then sed -i '/^CFLAGS/s/\(=.*\) -O3 \(.*\)\(-c\)/\1 '"$SLKCFLAGS"' \3/' Makefile @@ -89,8 +100,9 @@ make install \ INSTALL_LRDF_DIR=$PKG/usr/share/ladspa/rdf/ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -for i in COPYING CREDITS README; do - cat $i > $PKG/usr/doc/$PRGNAM-$VERSION/$i.plugins +cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION +for i in CREDITS README; do + cp -a $i $PKG/usr/doc/$PRGNAM-$VERSION/$i.plugins done # Now build the reverb editor @@ -99,11 +111,8 @@ rm -rf $REVERBED_SRCNAM-$REVERBED_VERSION tar xvf $CWD/$REVERBED_SRCNAM-$REVERBED_VERSION.tar.gz cd $REVERBED_SRCNAM-$REVERBED_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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -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). @@ -117,6 +126,9 @@ patch -p1 < $CWD/reverbed-default-config.diff --mandir=/usr/man \ --build=$ARCH-slackware-linux +# 20211201 bkw: fix -current build, force this flag always. +sed -i '/^CFLAGS/s/$/ -fcommon/' src/Makefile + if [ "$FORCE_SLACK_CFLAGS" = "yes" ]; then # CFLAGS not supported by autoconf! sed -i '/^CFLAGS/s/=.*-fPIC/= '"$SLKCFLAGS"' -fPIC/' src/Makefile @@ -129,30 +141,41 @@ 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 -# 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 +# man page written by SlackBuild author +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/reverbed.1 > $PKG/usr/man/man1/reverbed.1.gz # .desktop written by SlackBuild author mkdir -p $PKG/usr/share/applications cat $CWD/reverbed.desktop > $PKG/usr/share/applications/reverbed.desktop +# icon came from: +# https://www.hscripts.com/freeimages/icons/mechanical/spring-clipart.php +# and turned into a PNG via ImageMagick's convert. +for px in 16 32 48 64; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size $CWD/reverbed.png $dir/reverbed.png +done + +mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps +cat $CWD/128.png > $PKG/usr/share/icons/hicolor/128x128/apps/reverbed.png + +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/reverbed.png $PKG/usr/share/pixmaps/reverbed.png + # ChangeLog and NEWS are 0-length placeholders -for i in AUTHORS COPYING README; do - cat $i > $PKG/usr/doc/$PRGNAM-$VERSION/$i.reverbed +for i in AUTHORS README; do + cp -a $i $PKG/usr/doc/$PRGNAM-$VERSION/$i.reverbed done # Now package up the HTML docs cd $PKG/usr/doc/$PRGNAM-$VERSION tar xvf $CWD/$DOCS_SRCNAM-$DOCS_VERSION.tar.gz 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 {} \; + find . -type d -exec chmod 755 {} \+ + find . -type f -exec chmod 644 {} \+ cd - cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -171,4 +194,4 @@ if [ "${SETCAP:-yes}" = "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 |