summaryrefslogtreecommitdiffstats
path: root/audio/horgand/horgand.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/horgand/horgand.SlackBuild')
-rw-r--r--audio/horgand/horgand.SlackBuild48
1 files changed, 32 insertions, 16 deletions
diff --git a/audio/horgand/horgand.SlackBuild b/audio/horgand/horgand.SlackBuild
index ee550fc9d6..0e626c83db 100644
--- a/audio/horgand/horgand.SlackBuild
+++ b/audio/horgand/horgand.SlackBuild
@@ -1,18 +1,22 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for horgand
-# 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.
-# 20151126 bkw:
-# - fix build on -current (preparing for 14.2)
+# 20211203 bkw: BUILD=5, new-style icons
+# 20200117 bkw: fix default audio device, add startup info to README
+# 20151126 bkw: fix build on -current (preparing for 14.2)
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=horgand
VERSION=${VERSION:-1.14}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -22,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}
@@ -50,15 +58,18 @@ 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 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 {} \+
# Slackware's extra/fltk doesn't have /usr/include/Fl -> FL
sed -i '/#include/s,Fl/,FL/,' src/*
+# 20200117 bkw: fix default alsa device. plughw:0,0 doesn't exist on
+# Slackware by default, which prevents the app from starting up for the
+# first time to allow the user to pick a device which *does* exist.
+# See README.
+sed -i 's|plughw:0,0|default|' src/organAudioOut.C
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -79,13 +90,18 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size src/${PRGNAM}128.xpm $dir/$PRGNAM.png
+done
+
mkdir -p $PKG/usr/share/pixmaps
-cat src/${PRGNAM}128.xpm > $PKG/usr/share/pixmaps/$PRGNAM.xpm
+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 \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -101,4 +117,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