# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=libvfn
pkgver=3.0.1
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 --no-rebuild --print-errorlogs -C output
}

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

sha512sums="
f8d2fbc55aa616cb841ada1e7670b2be69a08faa04263e19551b176547259313b148dcca7525a1269e2e6591bcfe75acb6a297fe5465fbcd857e390a4b9dbbe7  libvfn-3.0.1.tar.gz
"
