openwrt/feed/nvme-cli/Makefile
Lee Miller aed9b64b71
All checks were successful
buildbot/travis_bionic Build done.
buildbot/multibuild_parent Build done.
buildbot/job/openwrt Build done.
Make a package for nvme-cli and include it into the waveshare image.
Also move there kmod-nvme.
2023-06-19 14:48:04 +03:00

54 lines
1.6 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=nvme-cli
PKG_VERSION:=2.4
PKG_RELEASE:=1
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/linux-nvme/nvme-cli/archive/refs/tags/
PKG_HASH:=7f80102a933e3bf46f4f2089cad119c827a363478235f66b89ddaad9ca57d019
PKG_MAINTAINER:=Lee Miller <lee.miller@tutanota.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
URL:=https://nvmexpress.org/
TITLE:=NVMe management command line interface
DEPENDS += +libopenssl
endef
define Package/$(PKG_NAME)/description
NVM-Express user space tooling for Linux.
endef
MESON_ARGS += --force-fallback-for=libnvme
define Package/$(PKG_NAME)/conffiles
/etc/nvme/discovery.conf
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nvme $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/nvme $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libnvme*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{nvme,nvme-mi}.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/nvme
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/etc/nvme/discovery.conf \
$(1)/etc/nvme
$(INSTALL_DIR) $(1)/lib/udev/rules.d
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/udev/rules.d/*.rules \
$(1)/lib/udev/rules.d
endef
$(eval $(call BuildPackage,$(PKG_NAME)))