summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author isaackwy2024-03-31 01:36:20 +0100
committer Willy Sudiarto Raharjo2024-04-01 01:50:33 +0200
commitae6e378229f858aa5d4bb1274703c811c769b82b (patch)
tree03a15cb99aa576846265259af8a59e55bbaf5b1f /development
parent00c6bec2a7aa9242d5a931951f22026d19d4f208 (diff)
downloadslackbuilds-ae6e378229f858aa5d4bb1274703c811c769b82b.tar.gz
development/jupyterlab: Add .desktop file
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/jupyterlab/doinst.sh9
-rw-r--r--development/jupyterlab/jupyterlab.SlackBuild22
-rw-r--r--development/jupyterlab/jupyterlab.desktop11
3 files changed, 26 insertions, 16 deletions
diff --git a/development/jupyterlab/doinst.sh b/development/jupyterlab/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/development/jupyterlab/doinst.sh
@@ -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
diff --git a/development/jupyterlab/jupyterlab.SlackBuild b/development/jupyterlab/jupyterlab.SlackBuild
index 545bed0d40..ff99229931 100644
--- a/development/jupyterlab/jupyterlab.SlackBuild
+++ b/development/jupyterlab/jupyterlab.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for jupyterlab
-# Copyright 2022-2023 Isaac Yu <isaacyu@protonmail.com>
+# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jupyterlab
VERSION=${VERSION:-3.5.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -47,20 +47,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -88,6 +74,9 @@ sed 's|etc|/etc|' -i setup.py
python3 setup.py install --root=$PKG
+# Install desktop file
+install -Dm644 $CWD/jupyterlab.desktop $PKG/usr/share/applications/jupyterlab.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
@@ -97,6 +86,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
diff --git a/development/jupyterlab/jupyterlab.desktop b/development/jupyterlab/jupyterlab.desktop
new file mode 100644
index 0000000000..93fe9409aa
--- /dev/null
+++ b/development/jupyterlab/jupyterlab.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=JupyterLab
+Comment=Run JupyterLab
+Exec=jupyter-lab %f
+Terminal=true
+Type=Application
+Icon=jupyterlab
+StartupNotify=true
+MimeType=application/x-ipynb+json;
+Categories=Development;Education;
+Keywords=python;