aboutsummaryrefslogtreecommitdiff
path: root/audio/fantasia/fantasia.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/fantasia/fantasia.SlackBuild')
-rw-r--r--audio/fantasia/fantasia.SlackBuild21
1 files changed, 15 insertions, 6 deletions
diff --git a/audio/fantasia/fantasia.SlackBuild b/audio/fantasia/fantasia.SlackBuild
index b3e4ae2ba4ff..4a08ecc119a0 100644
--- a/audio/fantasia/fantasia.SlackBuild
+++ b/audio/fantasia/fantasia.SlackBuild
@@ -6,18 +6,17 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211207 bkw: BUILD=2, new-style icons.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=fantasia
VERSION=${VERSION:-0.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-# 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
@@ -54,9 +53,19 @@ chmod 0755 $PKG/usr/bin/$PRGNAM
# Stick the icon where it goes
unzip -j $CWD/$SRCNAM-$VERSION.jar \
org/jsampler/view/fantasia/res/icons/LinuxSampler-logo.png
+
+convert -background none -extent 128x128 -gravity center \
+ LinuxSampler-logo.png PNG24:$PRGNAM.png
+
+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 $PRGNAM.png $dir/$PRGNAM.png
+done
+
mkdir -p $PKG/usr/share/pixmaps
-install -m0644 -oroot -groot LinuxSampler-logo.png \
- $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# .desktop file written by SlackBuild author
mkdir -p $PKG/usr/share/applications