aboutsummaryrefslogtreecommitdiffstats
path: root/community/ndctl/APKBUILD
blob: bdc48e1c049a9399d7d4d82174b30fe6bdbc3feb (plain) (blame)
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
51
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Breno Leitao <breno.leitao@gmail.com>
# Maintainer:
pkgname=ndctl
pkgver=71.1
pkgrel=1
pkgdesc="Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel"
url="https://github.com/pmem/ndctl"
arch="all"
license="GPL-2.0-only LGPL-2.1-only"
depends="libuuid json-c kmod"
makedepends="autoconf automake libtool asciidoc xmlto kmod-dev
	eudev-dev util-linux-dev json-c-dev linux-headers asciidoctor
	bash-completion keyutils-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs
	$pkgname-bash-completion:bashcomp:noarch"
source="ndctl-$pkgver.tar.gz::https://github.com/pmem/ndctl/archive/v$pkgver.tar.gz"
options="!check" # tests require building & loading the nfit_test.ko kernel module

prepare() {
	default_prepare
	echo $pkgver >"$builddir/version"
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-systemd
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completion for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/
}

sha512sums="92fb06ca64455775ce0b89ba0846f70235e02fe3502e2a8a55a858f76f87cb90ae98f5bf01620e5884f667ea78ee2bee2cd9e7a85ffa8f8d9c456e9282ca9ebc  ndctl-71.1.tar.gz"