# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=libvfn
pkgver=5.1.0
pkgrel=0
pkgdesc="Low-level NVM Express library"
url="https://github.com/OpenMPDK/libvfn"
# others arches are unsupported
arch="aarch64 x86_64"
license="MIT OR LGPL-2.1-or-later"
makedepends="libnvme-dev linux-headers meson perl"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenMPDK/libvfn/archive/refs/tags/v$pkgver.tar.gz"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
3fc1510ed5662a6cdcf68651723d3655be02365462a16235f63f375d8744a7cf18454c67f9cd3982595e2e76fd93024fb47874530f5eac15a12f7801988bbcbc  libvfn-5.1.0.tar.gz
"
