blob: 50a6aeb4624e1e424f5893a720bcf0a2b79fa314 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001# SPDX-License-Identifier: GPL-2.0-only
2#
3# Copyright (C) 2023 Luca Barbato
4
5include $(TOPDIR)/rules.mk
6
7PKG_NAME:=libnvme
8PKG_VERSION:=1.9
9PKG_RELEASE:=1
10
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12PKG_SOURCE_URL:=https://github.com/linux-nvme/libnvme/archive/refs/tags/v$(PKG_VERSION)
13PKG_HASH:=455867060d2b7563eab59fe21779dff469d98465028997178c7efbe4b8763206
14
15PKG_LICENSE:=GPL-2.0-or-later
16PKG_LICENSE_FILES:=LICENSE
17PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
18
19include $(INCLUDE_DIR)/package.mk
20include $(INCLUDE_DIR)/meson.mk
21
22define Package/libnvme
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=C Library for NVM Express on Linux
26 URL:=https://github.com/linux-nvme/libnvme
27 DEPENDS:=+libjson-c
28endef
29
30define Package/libnvme/description
31 This is the libnvme development C library. libnvme provides type
32 definitions for NVMe specification structures, enumerations, and
33 bit fields, helper functions to construct, dispatch, and decode
34 commands and payloads, and utilities to connect, scan, and manage
35 nvme devices on a Linux system.
36endef
37
38MESON_ARGS += \
39 -Dopenssl=disabled -Dpython=disabled -Dkeyutils=disabled
40
41define Package/libnvme/install
42 $(INSTALL_DIR) $(1)/usr/lib
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnvme*.so* $(1)/usr/lib/
44endef
45
46define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include/nvme
48 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/nvme/*.h $(1)/usr/include/nvme
49 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnvme*.so* $(1)/usr/lib/
52 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
53 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnvme*.pc $(1)/usr/lib/pkgconfig/
54endef
55
56$(eval $(call BuildPackage,libnvme))