void-packages/srcpkgs/nvme-cli/template

29 lines
999 B
Bash

# Template file for 'nvme-cli'
pkgname=nvme-cli
version=2.0
revision=1
build_style=meson
configure_args="-Ddocs=man -Dudevrulesdir=lib/udev/rules.d"
hostmakedepends="pkg-config"
makedepends="libnvme-devel zlib-devel json-c-devel libuuid-devel"
short_desc="NVMe management command line interface"
maintainer="Subhaditya Nath <sn03.general@gmail.com>"
license="GPL-2.0-only"
homepage="http://nvmexpress.org"
distfiles="https://github.com/linux-nvme/nvme-cli/archive/v${version}.tar.gz"
checksum=471869b3bf643bb357dc9613ad14d24ff342fcd97e2db5a753c81c335ad8859c
conf_files="/etc/nvme/*.conf"
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libhugetlbfs-devel"
else
CFLAGS="-D_GNU_SOURCE"
fi
post_install() {
# remove files that are systemd-only
rm -rf "${DESTDIR}/usr/lib/systemd"
rm -rf "${DESTDIR}/usr/lib/udev/rules.d/70-nvmf-autoconnect.rules" # calls systemctl
rm -rf "${DESTDIR}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf" # needs 70-nvmf-autoconnect.rules
}