diff --git a/common/shlibs b/common/shlibs index 11328b15a9c..073830fc144 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4148,3 +4148,4 @@ librz_search.so.0.3.4 rizin-0.3.4_1 librz_bin.so.0.3.4 rizin-0.3.4_1 libaravis-0.8.so.0 libaravis-0.8.21_1 libLimeSuite.so.20.10-1 LimeSuite-20.10.0_1 +libnvme.so.1 libnvme-1.0_1 diff --git a/srcpkgs/libnvme-devel b/srcpkgs/libnvme-devel new file mode 120000 index 00000000000..3228da1bc6d --- /dev/null +++ b/srcpkgs/libnvme-devel @@ -0,0 +1 @@ +libnvme \ No newline at end of file diff --git a/srcpkgs/libnvme-doc b/srcpkgs/libnvme-doc new file mode 120000 index 00000000000..3228da1bc6d --- /dev/null +++ b/srcpkgs/libnvme-doc @@ -0,0 +1 @@ +libnvme \ No newline at end of file diff --git a/srcpkgs/libnvme/patches/SCOPE_DELIMITER.patch b/srcpkgs/libnvme/patches/SCOPE_DELIMITER.patch new file mode 100644 index 00000000000..c25df742e76 --- /dev/null +++ b/srcpkgs/libnvme/patches/SCOPE_DELIMITER.patch @@ -0,0 +1,13 @@ +SCOPE_DELIMITER not defined in musl + +--- a/src/nvme/fabrics.c ++++ b/src/nvme/fabrics.c +@@ -325,7 +325,7 @@ + nvme_msg(r, LOG_ERR, "cannot copy: %s\n", src); + + const char *scope = NULL; +- char *p = strchr(tmp, SCOPE_DELIMITER); ++ char *p = strchr(tmp, '%'); + if (p) { + *p = '\0'; + scope = src + (p - tmp) + 1; diff --git a/srcpkgs/libnvme/template b/srcpkgs/libnvme/template new file mode 100644 index 00000000000..aafe21aa9aa --- /dev/null +++ b/srcpkgs/libnvme/template @@ -0,0 +1,39 @@ +# Template file for 'libnvme' +pkgname=libnvme +version=1.0 +revision=1 +build_style=meson +configure_args="-Ddocs=man" +hostmakedepends="pkg-config swig" +makedepends="libuuid-devel json-c-devel openssl-devel python3-devel" +short_desc="C Library for NVM Express on Linux" +maintainer="Subhaditya Nath " +license="LGPL-2.1-or-later" +homepage="https://github.com/linux-nvme/libnvme" +distfiles="https://github.com/linux-nvme/libnvme/archive/v${version}.tar.gz" +checksum=387524b1c24a4091a88bfb258c98c054f716da210e77702f0709164740370807 + +libnvme-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + depends+=" json-c-devel libuuid-devel openssl-devel" # otherwise 'pkgconf libnvme' doesn't work + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +} + +libnvme-doc_package() { + short_desc+=" - documentation" + pkg_install() { + vmove usr/share + } +} + +python3-libnvme_package() { + short_desc+=" - Python3 bindings" + pkg_install() { + vmove "usr/lib/python*" + } +} diff --git a/srcpkgs/python3-libnvme b/srcpkgs/python3-libnvme new file mode 120000 index 00000000000..3228da1bc6d --- /dev/null +++ b/srcpkgs/python3-libnvme @@ -0,0 +1 @@ +libnvme \ No newline at end of file