blob: 9841c23bd1e5c2f34b10a15e82377edea532efad (
plain)
1 # Description: Tiny, lightning fast, feature-packed file manager
2 # URL: https://github.com/jarun/nnn
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: ncurses readline
5 # Optional: patool mediainfo icons-in-terminal
6
7 name=nnn
8 version=3.5
9 release=1
10 source=(https://github.com/jarun/nnn/releases/download/v$version/$name-v$version.tar.gz)
11
12 build() {
13 cd $name-$version
14
15 sed -i 's/install: all/install:/' Makefile
16
17 # build with icons support if contrib/icons-in-terminal is installed
18 [[ -e /usr/share/icons-in-terminal ]] && PKGMK_NNN=' O_ICONS=1'
19
20 make $PKGMK_NNN
21 make DESTDIR=$PKG PREFIX=/usr install
22
23 mkdir $PKG/usr/share/nnn
24 # install provided scripts and plugins to $PKG/usr/share
25 pushd misc
26 for i in $(find . -type d | xargs) ; do
27 cp -r $i $PKG/usr/share/nnn;
28 done
29 popd
30 mv plugins $PKG/usr/share/nnn
31
32 # install auto-completion files if the ports for it are installed
33 if [ -e /usr/share/zsh ]; then
34 install -Dm644 $PKG/usr/share/nnn/zsh/_nnn \
35 $PKG/usr/share/zsh/site-functions/_nnn
36 fi
37 if [ -e /usr/lib/pkgconfig/bash-completion.pc ]; then
38 install -Dm644 $PKG/usr/share/nnn/bash/nnn-completion.bash \
39 $PKG/usr/share/bash-completion/completions/nnn
40 fi
41 # fish is not in core/opt/contrib, but the script get's installed to
42
43 find $PKG \(\
44 -iname '*README.md*' -o \
45 -iname '*contributing*' \) -delete
46 }
|