diff options
author | B. Watson <urchlay@slackware.uk> | 2023-01-03 18:48:28 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-01-07 08:13:44 +0700 |
commit | 66a43be96f5812435ea784b6e7e08f1b305a0646 (patch) | |
tree | 0393a3a3f1ef0c5395ba762bece13b53bdd28cc8 /multimedia | |
parent | 9ec476c6e7aea193587205dfb0266655cdf2e6c0 (diff) |
multimedia/vkeybd: New-style icons, fix .desktop.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/vkeybd/doinst.sh | 6 | ||||
-rw-r--r-- | multimedia/vkeybd/vkeybd.SlackBuild | 25 |
2 files changed, 26 insertions, 5 deletions
diff --git a/multimedia/vkeybd/doinst.sh b/multimedia/vkeybd/doinst.sh index 5fb28930db0b9..3e5691a052b5b 100644 --- a/multimedia/vkeybd/doinst.sh +++ b/multimedia/vkeybd/doinst.sh @@ -1,3 +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 usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/multimedia/vkeybd/vkeybd.SlackBuild b/multimedia/vkeybd/vkeybd.SlackBuild index d81cc11eab853..fe32c4c6062cf 100644 --- a/multimedia/vkeybd/vkeybd.SlackBuild +++ b/multimedia/vkeybd/vkeybd.SlackBuild @@ -12,19 +12,21 @@ # of this script had no license. Modified version licensed under the # WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230103 bkw: BUILD=4, new-style icons, fix .desktop file. + # 20180103 bkw: # - take over maintenance. # - i486 => i586. # - determine tcl version from system, instead of hardcoding. # - simplify script a bit. -# - fix grammer in README and slack-desc. +# - fix grammar in README and slack-desc. # - 'virtual keyboard' => 'virtual piano keyboard' in slack-desc. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=vkeybd VERSION=${VERSION:-0.1.18d} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -65,8 +67,11 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# make .desktop file validate -sed -i -e '/^Encoding/d' -e '/^Cat/s,Application;,,' $PRGNAM.desktop +# make .desktop file validate, use correct icon name. +sed -i -e '/^Encoding/d' \ + -e '/^Cat/s,Application;,,' \ + -e '/^Icon/s,_.*,,' \ + $PRGNAM.desktop # grab tcl version from the system TCLVER="$( basename $( readlink /usr/bin/tclsh|sed 's,tclsh,,' ) )" @@ -81,7 +86,17 @@ make \ gzip -9 $PKG/usr/man/man?/*.? strip $PKG/usr/bin/* -ln -s ${PRGNAM}_48x48.png $PKG/usr/share/pixmaps/$PRGNAM.png + +for i in pixmaps/${PRGNAM}_*x*.png; do + size=$( basename $i .png | cut -d_ -f2 ) + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cp -a $i $dir/$PRGNAM.png +done + +( cd $PKG/usr/share/pixmaps + rm -f * + ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png . ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a ChangeLog README $PKG/usr/doc/$PRGNAM-$VERSION |