aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nvme-cli/APKBUILD
blob: a83a3cf671f3b5ab8d1921c3f2dd5d0036696461 (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
# Contributor: Florian Heigl <florian.heigl@gmail.com>
# Maintainer: Florian Heigl <florian.heigl@gmail.com>
pkgname=nvme-cli
pkgver=1.1
pkgrel=1
pkgdesc="NVM-Express user space tooling for Linux"
arch="all"
url="https://github.com/linux-nvme/nvme-cli"
license="GPL"
depends=""
makedepends="$depends_dev linux-headers coreutils"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
source="$pkgname-$pkgver.tar.gz::https://github.com/linux-nvme/nvme-cli/archive/v${pkgver}.tar.gz
	musl-fix.patch
	"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	make PREFIX="/usr" || return 1
}

package() {
	cd "$builddir"
	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"/etc/bash_completion.d/nvme \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname || return 1
}

md5sums="450b5c381c83df8f117824e7d0fe0076  nvme-cli-1.1.tar.gz
f8e92a9d93b8cde78b82ad40f89f2c19  musl-fix.patch"
sha256sums="22883719cbab86d52e8d4755e86ebd70476416e87442385a79b31c981bd60de1  nvme-cli-1.1.tar.gz
79328b8836c27c661f12fd8a719bf27559c4824c2dd9a10dcf698e1373a007de  musl-fix.patch"
sha512sums="339da4385c5e8659a8f3c2e11afadf437d9cdf02c294674e5cc569cd817174c8ccbd4fc8858ce6f5b8f63ccba68790b2140fc87fdf33b7d394b67999ac4afad0  nvme-cli-1.1.tar.gz
01cea64b9593b4aac5c13a18538a561b5d538437232dc67f17d955c1661d42cf62671924277449f9611e0fb543cddc7e4ba89e34ff764eb86929201f1e336faa  musl-fix.patch"