summaryrefslogtreecommitdiffstats
path: root/system/nnn
diff options
context:
space:
mode:
Diffstat (limited to 'system/nnn')
-rw-r--r--system/nnn/doinst.sh9
-rw-r--r--system/nnn/nnn.SlackBuild28
-rw-r--r--system/nnn/nnn.info10
3 files changed, 31 insertions, 16 deletions
diff --git a/system/nnn/doinst.sh b/system/nnn/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/system/nnn/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/system/nnn/nnn.SlackBuild b/system/nnn/nnn.SlackBuild
index d28ee0dc3b..43f58f1dfd 100644
--- a/system/nnn/nnn.SlackBuild
+++ b/system/nnn/nnn.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for nnn
# Copyright 2017-2022 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nnn
-VERSION=${VERSION:-4.4}
+VERSION=${VERSION:-4.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +39,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -82,17 +80,24 @@ find -L . \
# compile
make CFLAGS="$SLKCFLAGS"
+# install executable, including desktop icons
+make DESTDIR=$PKG PREFIX=/usr MANPREFIX=/usr/man install
+make DESTDIR=$PKG PREFIX=/usr MANPREFIX=/usr/man install-desktop
+
+# Strip ELF binaries
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
-# install executable
-mkdir -p $PKG/usr/bin
-install -D -m0755 $PRGNAM $PKG/usr/bin/$PRGNAM
+# Compress man page
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
+
+# install bash and zsh completions
+install -Dm644 misc/auto-completion/bash/nnn-completion.bash $PKG/usr/share/bash-completion/completions/nnn
+install -Dm644 misc/auto-completion/zsh/_nnn $PKG/usr/share/zsh/site-functions/_nnn
-# install man page
-mkdir -p $PKG/usr/man/man1
-gzip -9 $PRGNAM.1
-install -D -m0644 $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM.1.gz
+# install quitcd (cd on quit script)
+# More details at: https://wiki.archlinux.org/title/Nnn#cd_on_quit_(Ctrl-G)
+install -Dm644 -t $PKG/usr/share/nnn/quitcd/ misc/quitcd/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
@@ -100,6 +105,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/system/nnn/nnn.info b/system/nnn/nnn.info
index 2753c037cc..556abf7fff 100644
--- a/system/nnn/nnn.info
+++ b/system/nnn/nnn.info
@@ -1,10 +1,10 @@
PRGNAM="nnn"
-VERSION="4.4"
+VERSION="4.9"
HOMEPAGE="https://github.com/jarun/nnn"
-DOWNLOAD="https://github.com/jarun/nnn/archive/v4.4/nnn-4.4.tar.gz"
-MD5SUM="3f5d7734648c9c0993131efe4158f1b8"
+DOWNLOAD="https://github.com/jarun/nnn/archive/v4.9/nnn-4.9.tar.gz"
+MD5SUM="4b2c880c78840f4f0d64b0fe84bbbf6c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Dimitris Zlatanidis"
-EMAIL="d.zlatanidis@gmail.com"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu@protonmail.com"