aboutsummaryrefslogtreecommitdiff
path: root/libs/msgpack-c/Makefile
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2021-03-18 13:08:45 +0800
committerPaul Spooren <mail@aparcar.org>2021-03-18 22:18:14 -1000
commitcfc965b10754fea8c71dad79e6b4cd7c02f47a9b (patch)
tree2c06b2d14c8e8b6b8d0720ea92f6c221885af4d7 /libs/msgpack-c/Makefile
parent1677e5fcd7a701e881612729400c03084328a69f (diff)
msgpack-c: add new package
This is needed by tmate. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Diffstat (limited to 'libs/msgpack-c/Makefile')
-rw-r--r--libs/msgpack-c/Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/libs/msgpack-c/Makefile b/libs/msgpack-c/Makefile
new file mode 100644
index 000000000..ab40fb36a
--- /dev/null
+++ b/libs/msgpack-c/Makefile
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-3.0-only
+#
+# Copyright (C) 2021 ImmortalWrt.org
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=msgpack-c
+PKG_VERSION:=3.3.0
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/msgpack/msgpack-c/tar.gz/cpp-$(PKG_VERSION)?
+PKG_HASH:=754c3ace499a63e45b77ef4bcab4ee602c2c414f58403bce826b76ffc2f77d0b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-cpp-$(PKG_VERSION)
+
+PKG_LICENSE:=BSL-1.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_OPTIONS+= -DMSGPACK_BUILD_EXAMPLES:BOOL=OFF
+
+define Package/msgpack-c
+ SECTION:=lib
+ CATEGORY:=Libraries
+ TITLE:=MessagePack implementation for C and C++
+ URL:=https://github.com/msgpack/msgpack-c
+endef
+
+define Package/msgpack-c/description
+ MessagePack is an efficient binary serialization format, which lets
+ you exchange data among multiple languages like JSON, except that
+ it's faster and smaller. Small integers are encoded into a single
+ byte and short strings require only one extra byte in addition to
+ the strings themselves.
+endef
+
+define Package/msgpack-c/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmsgpackc.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,msgpack-c))