aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2018-01-24 17:53:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-27 07:43:43 +0700
commitb538d5eea15eb359de7188f70648dc149d02cc2c (patch)
tree8174ee4093255a38880606528f854f505e03aba4
parente9421ef3a93f29df0efaebc678e5b1bfc5a869d5 (diff)
games/chessx: Added an icon and a desktop file.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--games/chessx/chessx.SlackBuild8
-rw-r--r--games/chessx/doinst.sh7
2 files changed, 13 insertions, 2 deletions
diff --git a/games/chessx/chessx.SlackBuild b/games/chessx/chessx.SlackBuild
index bcb00b8a0c93c..81f92468ed91c 100644
--- a/games/chessx/chessx.SlackBuild
+++ b/games/chessx/chessx.SlackBuild
@@ -76,8 +76,11 @@ make
# Create install directory since there is no 'make install' provided
# and make only outputs a single binary (chessx)
-mkdir -p $PKG/usr/bin
-cp -a ./release/chessx $PKG/usr/bin
+install -D -m 0755 release/$PRGNAM $PKG/usr/bin/$PRGNAM
+
+# Install also an icon and a desktop file
+install -D -m 0644 data/images/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+install -D -m 0644 unix/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -88,6 +91,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:-tgz}
diff --git a/games/chessx/doinst.sh b/games/chessx/doinst.sh
new file mode 100644
index 0000000000000..9a8ded3c60349
--- /dev/null
+++ b/games/chessx/doinst.sh
@@ -0,0 +1,7 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi