# Contributor: Florian Heigl # Maintainer: Florian Heigl pkgname=nvme-cli pkgver=1.10.1 pkgrel=0 pkgdesc="NVM-Express user space tooling for Linux" options="!check" # Requires nose2 arch="all" url="https://github.com/linux-nvme/nvme-cli" license="GPL-2.0-only" makedepends="linux-headers coreutils util-linux-dev util-linux" subpackages=" $pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch " source="$pkgname-$pkgver.tar.gz::https://github.com/linux-nvme/nvme-cli/archive/v$pkgver.tar.gz PATH_MAX.patch " build() { make PREFIX=/usr } package() { make PREFIX=/usr DESTDIR="$pkgdir" install } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions mv "$pkgdir"/usr/share/bash-completion/completions/nvme \ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname rmdir "$pkgdir"/usr/share/bash-completion/completions } zshcomp() { depends="" pkgdesc="Zsh compltions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" install -Dm644 "$builddir"/completions/_nvme \ "$subpkgdir"/usr/share/zsh/site-functions/_nvme } sha512sums="92bef073205b357f4b14ba929b7f261d0c18b343e5e244cefc24521dfc581dec4b941a13dc00f9a3b4d938ccd026c847d58ccfd75f813cc3c4f484f8316269dc nvme-cli-1.10.1.tar.gz c4b66b47c0ee04125cafd77b4601dcef3fe439fcc311e8a1850e83f903b81a81059acbcf15397054572b31b5b144964fac7aee1be3b0c2f3b26b65e87070ef10 PATH_MAX.patch"