summaryrefslogtreecommitdiffstats
path: root/audio/rakarrack/rakarrack.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/rakarrack/rakarrack.SlackBuild')
-rw-r--r--audio/rakarrack/rakarrack.SlackBuild45
1 files changed, 32 insertions, 13 deletions
diff --git a/audio/rakarrack/rakarrack.SlackBuild b/audio/rakarrack/rakarrack.SlackBuild
index b06ce7748a..2d83ab6b1a 100644
--- a/audio/rakarrack/rakarrack.SlackBuild
+++ b/audio/rakarrack/rakarrack.SlackBuild
@@ -1,19 +1,22 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for rakarrack
-# 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.
+# 20211205 bkw: BUILD=3, new-style icons.
# 20140114 bkw: add 64-bit distortion fix and setcap stuff.
-
# 20151126 bkw: fix build on -current, preparing for 14.2.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=rakarrack
VERSION=${VERSION:-0.6.1}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -23,7 +26,11 @@ 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}
@@ -51,11 +58,10 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+sed -i "/Icon=/s,=.*,=$PRGNAM," data/$PRGNAM.desktop
# work around a bug that causes distorion/overdrive not to work on 64-bit.
# this is a band-aid, not a real solution, but it seems to work OK.
@@ -80,10 +86,23 @@ make
make install-strip DESTDIR=$PKG
gzip $PKG/usr/man/man?/*.?
+rm -rf $PKG/usr/share/pixmaps/*
+for px in 32 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cp -a icons/icono_rakarrack_$size.png $dir/$PRGNAM.png
+done
+
+mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
+convert -resize 48x48 \
+ icons/icono_rakarrack_128x128.png \
+ $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -99,4 +118,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