aboutsummaryrefslogtreecommitdiff
path: root/audio/foo-yc20
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-11-29 18:56:01 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-12-04 10:09:06 +0700
commitd21ea4d48362706cb68aa4f7e3d915065a262117 (patch)
treeb34dba97a18d0cba02a976d41a0f3cb761024abe /audio/foo-yc20
parent45132935ae492fadae008b956205e5dae0106b91 (diff)
audio/foo-yc20: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/foo-yc20')
-rw-r--r--audio/foo-yc20/doinst.sh5
-rw-r--r--audio/foo-yc20/foo-yc20.SlackBuild26
-rw-r--r--audio/foo-yc20/foo-yc20.pngbin0 -> 15624 bytes
3 files changed, 21 insertions, 10 deletions
diff --git a/audio/foo-yc20/doinst.sh b/audio/foo-yc20/doinst.sh
index 4e8ba7071dea..3e5691a052b5 100644
--- a/audio/foo-yc20/doinst.sh
+++ b/audio/foo-yc20/doinst.sh
@@ -2,3 +2,8 @@ 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 usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/audio/foo-yc20/foo-yc20.SlackBuild b/audio/foo-yc20/foo-yc20.SlackBuild
index 65750f850aaa..efc1dc716975 100644
--- a/audio/foo-yc20/foo-yc20.SlackBuild
+++ b/audio/foo-yc20/foo-yc20.SlackBuild
@@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211129 bkw: BUILD=3, new-style icons.
# 20170621 bkw: Rework optimization options. Needed because -current's
# gcc7 requires massive amounts of memory to build this.
@@ -13,7 +14,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=foo-yc20
VERSION=${VERSION:-1.3.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -25,9 +26,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
@@ -60,11 +58,8 @@ 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 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,\<lib\>,lib$LIBDIRSUFFIX,g" Makefile
@@ -82,10 +77,21 @@ esac
make install DESTDIR=$PKG PREFIX=/usr
-# make the .desktop file pass desktop-file-validate
+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 $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
+
+# make the .desktop file pass desktop-file-validate, and use our icon.
sed -i \
-e '/^Encoding/d' \
-e '/^Categories/s/$/;/' \
+ -e '/^Icon/s,=.*,='$PRGNAM',' \
$PKG/usr/share/applications/$PRGNAM.desktop
strip $PKG/usr/bin/* $PKG/usr/lib$LIBDIRSUFFIX/lv2/$PRGNAM.lv2/*.so
diff --git a/audio/foo-yc20/foo-yc20.png b/audio/foo-yc20/foo-yc20.png
new file mode 100644
index 000000000000..a36bf6925af2
--- /dev/null
+++ b/audio/foo-yc20/foo-yc20.png
Binary files differ