system/qemu: Add doinst.sh for desktop/icons.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-07-01 18:00:41 -04:00 committed by Willy Sudiarto Raharjo
parent c7a437ff80
commit df3437a1d3
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 17 additions and 1 deletions

9
system/qemu/doinst.sh Normal file
View file

@ -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

View file

@ -23,11 +23,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20230701 bkw: Modified by SlackBuilds.org, BUILD=2:
# - add doinst to update desktop database and icon cache.
# Note: sbopkglint <= 0.9.0 complains about ELF binaries found in
# /usr/share/qemu (intended for the target systems). This is an error
# in sbopkglint, and will be fixed (no need to change anything here).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=qemu
VERSION=${VERSION:-7.2.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -179,6 +185,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE