summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-08-10 16:45:01 +0000
committerZach van Rijn <me@zv.io>2021-08-10 16:45:01 +0000
commit9a98e2907ec1a5f36e40e9b60c20cf74a7622c3a (patch)
treecc1379e81fb61b35245c09ece80abd0087f17794
parent2bf0f548ae2f54c3f67a2f931749f086b6140e88 (diff)
parent761e805266c2f63eb504f08ebb042eb3cb50c6a0 (diff)
downloadpackages-9a98e2907ec1a5f36e40e9b60c20cf74a7622c3a.tar.gz
packages-9a98e2907ec1a5f36e40e9b60c20cf74a7622c3a.tar.bz2
packages-9a98e2907ec1a5f36e40e9b60c20cf74a7622c3a.tar.xz
packages-9a98e2907ec1a5f36e40e9b60c20cf74a7622c3a.zip
Merge branch 'nvme-cli' into 'master'
user/nvme-cli: new package See merge request adelie/packages!621
-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"