summaryrefslogtreecommitdiff
path: root/libs/libcbor
diff options
context:
space:
mode:
authorLinos Giannopoulos <linosgian00@gmail.com>2021-01-06 03:43:55 +0200
committerLinos Giannopoulos <linosgian00@gmail.com>2021-01-07 00:53:05 +0200
commit42e2f427e699ce9901d8b5e1904853ddb0364b71 (patch)
tree1e3386b448eea89653f180ac21e5b6e324d3c6d4 /libs/libcbor
parent7ce3b159e340240c4fd61c0dce46d6ae8e22875c (diff)
libcbor: Add new package
Libcbor is a C library for parsing and generating CBOR[0], the general-purpose schema-less binary data format. [0]: https://tools.ietf.org/html/rfc7049 Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
Diffstat (limited to 'libs/libcbor')
-rw-r--r--libs/libcbor/Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/libs/libcbor/Makefile b/libs/libcbor/Makefile
new file mode 100644
index 000000000..7c0735f28
--- /dev/null
+++ b/libs/libcbor/Makefile
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2020 Linos Giannopoulos
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcbor
+PKG_VERSION:=0.8.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/PJK/libcbor/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=618097166ea4a54499646998ccaa949a5816e6a665cf1d6df383690895217c8b
+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Linos Giannopoulos <linosgian00+openwrt@gmail.com>
+
+CMAKE_OPTIONS += \
+ -DBUILD_SHARED_LIBS=ON
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libcbor
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=libcbor
+ URL:=https://github.com/PJK/libcbor
+ ABI_VERSION:=0
+endef
+
+define Package/libcbor/description
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+endef
+
+
+define Package/libcbor/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcbor.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcbor))