diff options
Diffstat (limited to 'system/nnn/nnn.SlackBuild')
-rw-r--r-- | system/nnn/nnn.SlackBuild | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/system/nnn/nnn.SlackBuild b/system/nnn/nnn.SlackBuild index d28ee0dc3b3c..51fe242dd5d0 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 |