summaryrefslogtreecommitdiff
path: root/sys-block/ndctl/ndctl-77-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-07 15:42:35 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-07 15:42:35 +0100
commita693a49d235bea057923bcbc2ee6a40cce4bb060 (patch)
tree7b927ab3d5df3dce15e8c6a727db1831137f9a00 /sys-block/ndctl/ndctl-77-r1.ebuild
parentbba809b22a050e394e6ce550572ee7f6c6e02a6e (diff)
gentoo auto-resync : 07:06:2023 - 15:42:35
Diffstat (limited to 'sys-block/ndctl/ndctl-77-r1.ebuild')
-rw-r--r--sys-block/ndctl/ndctl-77-r1.ebuild80
1 files changed, 80 insertions, 0 deletions
diff --git a/sys-block/ndctl/ndctl-77-r1.ebuild b/sys-block/ndctl/ndctl-77-r1.ebuild
new file mode 100644
index 000000000000..bc23fbb0b714
--- /dev/null
+++ b/sys-block/ndctl/ndctl-77-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit udev meson bash-completion-r1
+
+DESCRIPTION="Helper tools and libraries for managing non-volatile memory on Linux"
+HOMEPAGE="https://github.com/pmem/ndctl"
+SRC_URI="https://github.com/pmem/ndctl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT CC0-1.0"
+SLOT="0/6"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc libtracefs systemd test"
+
+DEPEND="
+ dev-libs/iniparser:4=
+ dev-libs/json-c:=
+ sys-apps/keyutils:=
+ sys-apps/kmod:=
+ sys-apps/util-linux:=
+ virtual/libudev:=
+ libtracefs? ( dev-libs/libtracefs:= )
+ systemd? ( sys-apps/systemd:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )
+ sys-devel/libtool
+ virtual/pkgconfig
+"
+
+RESTRICT="!test? ( test )"
+
+# tests require root access
+RESTRICT+=" test"
+
+DOCS=(
+ README.md
+ CONTRIBUTING.md
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-77-iniparser4.patch
+)
+
+src_configure() {
+ local -a emesonargs=(
+ $(meson_feature systemd)
+ $(meson_feature libtracefs)
+ $(meson_feature doc docs)
+ -Dasciidoctor=disabled
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ -Drootprefix=/usr
+ -Drootlibdir="/usr/$(get_libdir)"
+ )
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # upstream doesn't install udev rules unless using systemd
+ use systemd || udev_dorules daxctl/90-daxctl-device.rules
+
+ bashcomp_alias ndctl daxctl
+ bashcomp_alias ndctl cxl
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}