summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2021-08-10 11:40:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2021-08-10 11:40:52 -0500
commit761e805266c2f63eb504f08ebb042eb3cb50c6a0 (patch)
treecc1379e81fb61b35245c09ece80abd0087f17794 /user
parent2bf0f548ae2f54c3f67a2f931749f086b6140e88 (diff)
downloadpackages-761e805266c2f63eb504f08ebb042eb3cb50c6a0.tar.gz
packages-761e805266c2f63eb504f08ebb042eb3cb50c6a0.tar.bz2
packages-761e805266c2f63eb504f08ebb042eb3cb50c6a0.tar.xz
packages-761e805266c2f63eb504f08ebb042eb3cb50c6a0.zip
user/nvme-cli: new package
Diffstat (limited to 'user')
-rw-r--r--user/nvme-cli/APKBUILD52
-rw-r--r--user/nvme-cli/add-limits.patch20
2 files changed, 72 insertions, 0 deletions
diff --git a/user/nvme-cli/APKBUILD b/user/nvme-cli/APKBUILD
new file mode 100644
index 000000000..a7e99f34b
--- /dev/null
+++ b/user/nvme-cli/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: CyberLeo <cyberleo@cyberleo.net>
+# Maintainer: CyberLeo <cyberleo@cyberleo.net>
+pkgname=nvme-cli
+pkgver=1.15
+pkgrel=0
+pkgdesc="NVM-Express user space tooling for Linux"
+options="!check" # Requires nose2
+arch="all"
+url="https://github.com/linux-nvme/nvme-cli"
+license="GPL-2.0-only"
+makedepends="linux-headers coreutils util-linux-dev util-linux libuuid"
+subpackages="
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/linux-nvme/nvme-cli/archive/v$pkgver.tar.gz
+ add-limits.patch"
+
+build() {
+ make PREFIX=/usr
+}
+
+package() {
+ make PREFIX=/usr DESTDIR="$pkgdir" UDEVDIR=/usr/lib/udev install
+ rm -rf "$pkgdir"/usr/lib/systemd
+}
+
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
+ mv "$pkgdir"/usr/share/bash-completion/completions/* \
+ "$subpkgdir"/usr/share/bash-completion/completions/
+}
+
+zshcomp() {
+ depends=""
+ pkgdesc="Zsh completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ mkdir -p "$subpkgdir/usr/share/zsh/site-functions"
+ mv "$pkgdir"/usr/share/zsh/site-functions/* \
+ "$subpkgdir"/usr/share/zsh/site-functions
+}
+
+sha512sums="
+0614105153edf7217d4c428927423628b63f6bee034c59926370a13d433c9c3af217338fb6fe2f8bbf781fc17ebae0102e8c072371b7ea4324c18dfdffd40305 nvme-cli-1.15.tar.gz
+cee0623c3b17c74edc365eed80b3a03086ccb68f4fe00a0cd13ee65f0602a1edb0eed64a352403dd71a25f2779dc410fd2497a17be1e565958a7616dd375da70 add-limits.patch
+"
diff --git a/user/nvme-cli/add-limits.patch b/user/nvme-cli/add-limits.patch
new file mode 100644
index 000000000..d62718199
--- /dev/null
+++ b/user/nvme-cli/add-limits.patch
@@ -0,0 +1,20 @@
+--- nvme-cli-1.14.orig/nvme-rpmb.c
++++ nvme-cli-1.14/nvme-rpmb.c
+@@ -25,6 +25,7 @@
+ #include <sys/socket.h>
+ #include <linux/if_alg.h>
+ #include <linux/socket.h>
++#include <limits.h>
+
+ #include "nvme.h"
+ #include "nvme-print.h"
+--- nvme-cli-1.14.orig/nvme-topology.c
++++ nvme-cli-1.14/nvme-topology.c
+@@ -5,6 +5,7 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <limits.h>
+
+ #include "nvme.h"
+ #include "nvme-ioctl.h"