summaryrefslogtreecommitdiff
path: root/nnn/Pkgfile
blob: f6324d5bad3fdf73b4f737d879941438763f45de (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=4.7
    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   prt-get isinst icons-in-terminal && PKGMK_NNN+=' O_ICONS=1'
   19 
   20   make $PKGMK_NNN
   21   make DESTDIR=$PKG PREFIX=/usr install
   22   make DESTDIR=$PKG PREFIX=/usr install-desktop
   23 
   24   mkdir $PKG/usr/share/nnn
   25   # install provided scripts and plugins to $PKG/usr/share
   26   pushd misc
   27   for i in $(find . -type d | xargs) ; do
   28     cp -r $i $PKG/usr/share/nnn;
   29   done
   30   popd
   31   mv plugins $PKG/usr/share/nnn
   32 
   33   # install auto-completion files if the ports for it are installed
   34   prt-get isinst zsh && install -Dm644 $PKG/usr/share/nnn/zsh/_nnn \
   35     $PKG/usr/share/zsh/site-functions/_nnn
   36   prt-get isinst bash-completion && install -Dm644 $PKG/usr/share/nnn/bash/nnn-completion.bash \
   37     $PKG/usr/share/bash-completion/completions/nnn
   38   # fish is not in core/opt/contrib, but the script get's installed to
   39 
   40   find $PKG \(\
   41     -iname '*README.md*' -o \
   42     -iname '*contributing*' \) -delete
   43 }

Generated by cgit