#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=nvme-cli-git
pkgver=r3013.2aa27212
pkgrel=02
pkgdesc='NVM-Express user space tooling for Linux'
arch=('x86_64')
url="https://github.com/linux-nvme/nvme-cli"
depends=('util-linux' )
makedepends=('meson' 'git')
provides=('nvme-cli')
conflicts=('nvme-cli')
source=("$pkgname::git+https://github.com/linux-nvme/nvme-cli.git")
install=nvme-cli-git.install

pkgver() { 
	cd "${pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${pkgname}"
	meson setup \
	--prefix /usr \
	--libexecdir lib \
	--sbindir bin \
	--buildtype plain \
	--auto-features enabled \
	-D b_lto=true -D b_pie=true \
	-D udevrulesdir=lib/udev/rules.d \
	.build
}

package() {
	cd "${pkgname}"
	DESTDIR="$pkgdir" meson install -C .build
	rm -rf $pkgdir/usr/lib/systemd
}

#---- license gpg-key sha256sums ----

license=('GPL')

sha256sums=('SKIP')

