git » ndctl.git » main » tree

[main] / PKGBUILD

# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ndctl
pkgver=78
pkgrel=1
pkgdesc='Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel'
arch=('x86_64' 'armv7h')
url="https://github.com/pmem/ndctl"
license=('LGPL')
depends=('iniparser' 'json-c' 'keyutils' 'kmod' 'libtraceevent' 'libtracefs' 'systemd-libs'
         'util-linux-libs')
makedepends=(
'asciidoc' 
'bash-completion' 'cmake' 'meson' 'systemd' 'xmlto')
source=("https://github.com/pmem/ndctl/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('ad217dd45c8d6bbd0089a88c46e1e04813b65e97c8817aaddeca967b20ce948e76c4b7ede5517c45d0b645b5c3dc61aac95cc944e8e5fc60100e45b41f13f2a0')

prepare() {
  # fix location of modprobe.d conf
  sed -i "s|^modprobedatadir =.*|modprobedatadir = '/usr/lib/modprobe.d/'|" $pkgname-$pkgver/contrib/meson.build
}

build() {
  arch-meson $pkgname-$pkgver build -Dasciidoctor=disabled
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}