contrib/nnn/Pkgfile

42 lines
1.2 KiB
Plaintext
Raw Normal View History

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
# Optional: patool mediainfo
name=nnn
2020-02-12 12:58:08 +01:00
version=3.0
2019-06-11 23:45:47 +02:00
release=1
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
2019-06-11 23:45:47 +02:00
sed -i 's/install: all/install:/' Makefile
make
make DESTDIR=$PKG PREFIX=/usr install
mkdir $PKG/usr/share/nnn
# install provided scripts and plugins to $PKG/usr/share
2019-08-07 22:07:20 +02: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
if [ -e /lib/zsh ]; then
mkdir -p $PKG/usr/share/zsh/site-functions/
2020-01-15 11:17:37 +01:00
cp $PKG/usr/share/nnn/zsh/_nnn \
2019-12-04 13:52:58 +01:00
$PKG/usr/share/zsh/site-functions/_nnn
fi
if [ -e /usr/share/bash-completion ]; then
mkdir -p $PKG/usr/share/bash-completion/completions
2020-01-15 11:17:37 +01:00
cp $PKG/usr/share/nnn/bash/nnn-completion.bash \
2019-12-04 13:52:58 +01:00
$PKG/usr/share/bash-completion/completions/nnn
fi
# fish is not in core/opt/contrib, but the script get's installed to
2019-06-11 23:45:47 +02:00
find $PKG -name README.md -delete
}