2019-06-11 23:45:47 +02:00
|
|
|
# Description: Tiny, lightning fast, feature-packed file manager
|
|
|
|
# URL: https://github.com/jarun/nnn
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
|
|
# Depends on: ncurses readline
|
2020-11-18 14:46:02 +00:00
|
|
|
# Optional: patool mediainfo icons-in-terminal
|
2019-06-11 23:45:47 +02:00
|
|
|
|
|
|
|
name=nnn
|
2022-04-27 18:08:12 +02:00
|
|
|
version=4.5
|
2021-09-30 21:46:30 +02:00
|
|
|
release=1
|
2019-06-11 23:45:47 +02:00
|
|
|
source=(https://github.com/jarun/nnn/releases/download/v$version/$name-v$version.tar.gz)
|
|
|
|
|
|
|
|
build() {
|
2020-02-12 12:58:08 +01:00
|
|
|
cd $name-$version
|
2020-11-18 14:46:02 +00:00
|
|
|
|
2019-06-11 23:45:47 +02:00
|
|
|
sed -i 's/install: all/install:/' Makefile
|
2020-11-18 14:46:02 +00:00
|
|
|
|
|
|
|
# build with icons support if contrib/icons-in-terminal is installed
|
2021-04-13 20:16:56 +00:00
|
|
|
prt-get isinst icons-in-terminal && PKGMK_NNN+=' O_ICONS=1'
|
2020-11-18 14:46:02 +00:00
|
|
|
|
|
|
|
make $PKGMK_NNN
|
2019-06-11 23:45:47 +02:00
|
|
|
make DESTDIR=$PKG PREFIX=/usr install
|
2021-07-25 13:07:34 +02:00
|
|
|
make DESTDIR=$PKG PREFIX=/usr install-desktop
|
2019-06-11 23:45:47 +02:00
|
|
|
|
2020-11-18 14:46:02 +00:00
|
|
|
mkdir $PKG/usr/share/nnn
|
2019-06-11 23:45:47 +02:00
|
|
|
# install provided scripts and plugins to $PKG/usr/share
|
2019-08-07 20:07:20 +00:00
|
|
|
pushd misc
|
2019-12-04 13:52:58 +01:00
|
|
|
for i in $(find . -type d | xargs) ; do
|
2019-06-11 23:45:47 +02:00
|
|
|
cp -r $i $PKG/usr/share/nnn;
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
mv plugins $PKG/usr/share/nnn
|
2019-12-04 13:52:58 +01:00
|
|
|
|
|
|
|
# install auto-completion files if the ports for it are installed
|
2021-03-15 20:23:02 +00:00
|
|
|
prt-get isinst zsh && install -Dm644 $PKG/usr/share/nnn/zsh/_nnn \
|
|
|
|
$PKG/usr/share/zsh/site-functions/_nnn
|
|
|
|
prt-get isinst bash-completion && install -Dm644 $PKG/usr/share/nnn/bash/nnn-completion.bash \
|
|
|
|
$PKG/usr/share/bash-completion/completions/nnn
|
2019-12-04 13:52:58 +01:00
|
|
|
# fish is not in core/opt/contrib, but the script get's installed to
|
|
|
|
|
2020-07-14 06:28:11 +00:00
|
|
|
find $PKG \(\
|
|
|
|
-iname '*README.md*' -o \
|
|
|
|
-iname '*contributing*' \) -delete
|
2019-06-11 23:45:47 +02:00
|
|
|
}
|