summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Yu <isaacyu1@isaacyu1.com>2022-08-17 15:51:26 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-08-20 09:02:47 +0700
commit7b2678aa1c4b8dd7b061ff1a8cc15cf6a36f42ae (patch)
treeed684cf61b6727ae071690cc8ba4896b8fc99384
parent803eda503bc49dce6aa133fc1388298a1393265e (diff)
downloadslackbuilds-7b2678aa1c4b8dd7b061ff1a8cc15cf6a36f42ae.tar.gz
system/nnn: Update for 4.6 (+new maintainer)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/nnn/doinst.sh9
-rw-r--r--system/nnn/nnn.SlackBuild25
-rw-r--r--system/nnn/nnn.info10
3 files changed, 31 insertions, 13 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..51fe242dd5 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 Isaac Yu <isaacyu1@isaacyu1.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.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -82,17 +83,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 +108,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..4aa83bd3d9 100644
--- a/system/nnn/nnn.info
+++ b/system/nnn/nnn.info
@@ -1,10 +1,10 @@
PRGNAM="nnn"
-VERSION="4.4"
+VERSION="4.6"
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.6/nnn-4.6.tar.gz"
+MD5SUM="597ef6d2a7c45ae0d12c636186db08f1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Dimitris Zlatanidis"
-EMAIL="d.zlatanidis@gmail.com"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu1@isaacyu1.com"