# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=vifm
pkgver=0.14.2
pkgrel=0
pkgdesc="ncurses vi-like file manager"
url="https://vifm.info/"
arch="all"
license="GPL-2.0-or-later"
makedepends="ncurses-dev coreutils mandoc perl file-dev"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/vifm/vifm/archive/v$pkgver.tar.gz
	perl-interpreter-fix.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-libmagic \
		--without-X11 \
		--without-gtk \
		--disable-build-timestamp
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
b3d800176d7e09599e6b98feef909408c5dae41e0a969b370e41347651ff8f01775a0b7b06e9da8cfd218fefdffbaa5ee9720ac22c47835eda64c87f9ac7b26c  vifm-0.14.2.tar.gz
9aa55e00be8b8305184f16d76cb61cfc16ee90772c69c52d1b740f1fddbc2f7ea63a3586a0269c6bd6f5c5209c0956bec3a0c0094dc2a693390cde4c63ffa8d6  perl-interpreter-fix.patch
"
