avahi: backport CVE fixes from upstream
[feed/packages.git] / libs / libnvme / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2023 Luca Barbato
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=libnvme
8 PKG_VERSION:=1.5
9 PKG_RELEASE:=1
10
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_URL:=https://github.com/linux-nvme/libnvme/archive/refs/tags/v$(PKG_VERSION)
13 PKG_HASH:=f73ba1edde059b2d5e7c1048ad4f895e6047bff241c94b34a7aff5894779d086
14
15 PKG_LICENSE:=GPL-2.0-or-later
16 PKG_LICENSE_FILES:=LICENSE
17 PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
18
19 include $(INCLUDE_DIR)/package.mk
20 include $(INCLUDE_DIR)/meson.mk
21
22 define 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
28 endef
29
30 define 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.
36 endef
37
38 MESON_ARGS += \
39 -Dopenssl=disabled -Dpython=disabled -Dlibdbus=disabled -Dkeyutils=disabled
40
41 define Package/libnvme/install
42 $(INSTALL_DIR) $(1)/usr/lib
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnvme*.so* $(1)/usr/lib/
44 endef
45
46 define 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/
54 endef
55
56 $(eval $(call BuildPackage,libnvme))