[dbeaver] install .desktop file

This commit is contained in:
Gwenhael Le Moine 2022-06-08 15:28:13 +02:00
parent bdcb005db2
commit 9ccb1ef281
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -2,9 +2,6 @@
# Slackware build script for dbeaver
# Copyright 2014 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@ -48,7 +45,7 @@ mkdir -p $TMP $PKG $OUTPUT
SRCNAM=dbeaver-ce
SRCVER=$VERSION-linux.gtk.$SRCARCH
DESTDIR=$PKG/opt/
DESTDIR=$PKG/usr/share
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
@ -60,29 +57,33 @@ mkdir -p $REPOSITORY
mkdir -p $DESTDIR
cd $DESTDIR
tar xvf $REPOSITORY/$SRCNAM-$SRCVER.tar.gz
mv dbeaver dbeaver-ce
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 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chmod ga+x $DESTDIR/dbeaver/dbeaver
chmod ga+x $DESTDIR/dbeaver-ce/dbeaver
mkdir -p $PKG/usr/share/applications/
cp $DESTDIR/dbeaver-ce/dbeaver-ce.desktop $PKG/usr/share/applications/
mkdir -p $PKG/usr/bin
cat << EOF > $PKG/usr/bin/dbeaver
#!/bin/bash
cd \$HOME
/opt/dbeaver/dbeaver \$@
/usr/share/dbeaver-ce/dbeaver \$@
EOF
chmod 0755 $PKG/usr/bin/dbeaver
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
mkdir -p $PKG/usr/doc/dbeaver
mkdir -p $PKG/usr/doc/dbeaver-ce
cp -a \
$DESTDIR/dbeaver/readme.txt $DESTDIR/dbeaver/licenses/* \
$PKG/usr/doc/dbeaver
$DESTDIR/dbeaver-ce/readme.txt $DESTDIR/dbeaver-ce/licenses/* \
$PKG/usr/doc/dbeaver-ce/
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc