# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=nnn pkgver=2.5 pkgrel=0 pkgdesc="The missing terminal file browser for X" url="https://github.com/jarun/nnn" arch="all !armhf !armv7" # armhf: fails to build license="BSD-2-Clause" makedepends="ncurses-dev readline-dev" options="!check" # no tests provided and `nnn -v` requires tty subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-fish-completion:fishcomp:noarch $pkgname-zsh-completion:zshcomp:noarch " source="$pkgname-$pkgver.tar.gz::https://github.com/jarun/$pkgname/archive/v$pkgver.tar.gz nlay" build() { make } package() { make install DESTDIR="$pkgdir" PREFIX=/usr # Overwrite the provided nlay script with our POSIX compliant version. install -m 755 "$srcdir"/nlay "$pkgdir"/usr/bin/nlay } bashcomp() { pkgdesc="Bash completions for $pkgname" depends="" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" cd "$builddir" install -D -m 644 scripts/auto-completion/bash/nnn-completion.bash \ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname } fishcomp() { pkgdesc="Fish completions for $pkgname" depends="" install_if="$pkgname=$pkgver-r$pkgrel fish" cd "$builddir" install -D -m 644 scripts/auto-completion/fish/nnn.fish \ "$subpkgdir"/usr/share/fish/completions/$pkgname.fish } zshcomp() { pkgdesc="ZSH completions for $pkgname" depends="" install_if="$pkgname=$pkgver-r$pkgrel zsh" cd "$builddir" install -D -m 644 scripts/auto-completion/zsh/_nnn \ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums="eb50b5368811a9b93caa385a94b2e6a63705bd0ba1db4dc9a3a628a42d11547d53095736e4afa6f73037064b2ef883fe9a60cb048279ba0dd9889503de7e5167 nnn-2.5.tar.gz 9f70f5fec2799caf1624e1334e687072dde94ee550a4cd7ee5a1a6b9b880f3fe40b6cbd631ce2d024cb811b5115249e7cd81c880c88f2289f627cd866fc06036 nlay"