aboutsummaryrefslogtreecommitdiffstats
path: root/community/nvme-cli/APKBUILD
blob: a4db23f600e698f9a384fcd7782a1117e0730561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Contributor: Florian Heigl <florian.heigl@gmail.com>
# Maintainer: Florian Heigl <florian.heigl@gmail.com>
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"