summaryrefslogtreecommitdiffstats
path: root/audio/sfc
diff options
context:
space:
mode:
author B. Watson2021-12-05 17:10:46 +0100
committer Willy Sudiarto Raharjo2021-12-10 02:37:35 +0100
commit199a463086fa4cf7764e40f8c45657fe09c21bc0 (patch)
tree3520ca14e5f0af62ad2241e7bc502ea74331e94c /audio/sfc
parentb8258d1f78fcd28284a28fa70726bfe41cc97839 (diff)
downloadslackbuilds-199a463086fa4cf7764e40f8c45657fe09c21bc0.tar.gz
audio/sfc: Icons, .desktop.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/sfc')
-rw-r--r--audio/sfc/README6
-rw-r--r--audio/sfc/doinst.sh9
-rw-r--r--audio/sfc/sfc.SlackBuild42
-rw-r--r--audio/sfc/sfc.desktop8
-rw-r--r--audio/sfc/sfc.pngbin0 -> 955 bytes
-rw-r--r--audio/sfc/slack-desc4
6 files changed, 52 insertions, 17 deletions
diff --git a/audio/sfc/README b/audio/sfc/README
index 7696c735de..67bc48c934 100644
--- a/audio/sfc/README
+++ b/audio/sfc/README
@@ -1,8 +1,10 @@
+sfc (midi router)
+
sfc (SoundFontCombi) is a midi router designed to mix the sounds of
your sound devices. Up to 8 sounds can be mixed or split. There are 6
MIDI out ports and 2 MIDI in ports. Up to six different devices can be
used to produce combinations of sounds like some synthesizers.
The connections with your devices are automated. You can load/save
-your "mixes" in banks of sounds, and change it via MIDI Program Change
-message or by the user interface.
+your "mixes" in banks of sounds, and change them via MIDI Program
+Change message or by the user interface.
diff --git a/audio/sfc/doinst.sh b/audio/sfc/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/audio/sfc/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/audio/sfc/sfc.SlackBuild b/audio/sfc/sfc.SlackBuild
index 29125f5147..ea2058d3f2 100644
--- a/audio/sfc/sfc.SlackBuild
+++ b/audio/sfc/sfc.SlackBuild
@@ -6,11 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211204 bkw: BUILD=3.
+# - install setgid audio (for access to /dev/snd/seq).
+# - add icons and .desktop.
+# - fix hardcoded (wrong) version number in binary.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sfc
VERSION=${VERSION:-0.018}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +27,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -57,11 +59,10 @@ 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 {} \+
+
+sed -i "s,v0\.017,v$VERSION,g" src/{SFSUI.cxx,main.C}
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -77,12 +78,27 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-# TODO: icon, .desktop, maybe a man page?
+# needs to be setgid audio
+chown root:audio $PKG/usr/bin/$PRGNAM
+chmod 2750 $PKG/usr/bin/$PRGNAM
+
+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/$PRGNAM.png $dir/$PRGNAM.png
+done
+
+mkdir -p $PKG/usr/share/pixmaps/
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+# TODO: maybe a man page?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/audio/sfc/sfc.desktop b/audio/sfc/sfc.desktop
new file mode 100644
index 0000000000..26e69eacba
--- /dev/null
+++ b/audio/sfc/sfc.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=SFC (SoundFontCombi)
+Comment=MIDI Router
+Exec=sfc
+Terminal=false
+Type=Application
+Categories=AudioVideo;Audio;
+Icon=sfc
diff --git a/audio/sfc/sfc.png b/audio/sfc/sfc.png
new file mode 100644
index 0000000000..581733addd
--- /dev/null
+++ b/audio/sfc/sfc.png
Binary files differ
diff --git a/audio/sfc/slack-desc b/audio/sfc/slack-desc
index 6c3b65e701..5ec3f6626c 100644
--- a/audio/sfc/slack-desc
+++ b/audio/sfc/slack-desc
@@ -14,6 +14,6 @@ sfc: 6 MIDI out ports and 2 MIDI in ports. Up to six different devices
sfc: can be used to produce combinations of sounds like some synthesizers.
sfc:
sfc: The connections with your devices are automated. You can load/save
-sfc: your "mixes" in banks of sounds, and change it via Midi Program Change
-sfc: message or by the user interface.
+sfc: your "mixes" in banks of sounds, and change them via Midi Program
+sfc: Change message or by the user interface.
sfc: