You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=msgpack-c
  6. PKG_VERSION:=4.0.0
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://codeload.github.com/msgpack/msgpack-c/tar.gz/c-$(PKG_VERSION)?
  10. PKG_HASH:=656ebe4566845e7bda9c097b625ba59ac72ddfd45df6017172d46d9ac7365aa3
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-c-$(PKG_VERSION)
  12. PKG_LICENSE:=BSL-1.0
  13. PKG_LICENSE_FILES:=COPYING LICENSE_1_0.txt
  14. PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
  15. PKG_BUILD_PARALLEL:=1
  16. CMAKE_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. CMAKE_OPTIONS+= \
  20. -DBUILD_SHARED_LIBS=ON \
  21. -DMSGPACK_BUILD_EXAMPLES=OFF \
  22. -DMSGPACK_BUILD_TESTS=OFF \
  23. -DMSGPACK_ENABLE_STATIC=OFF
  24. define Package/msgpack-c
  25. SECTION:=lib
  26. CATEGORY:=Libraries
  27. TITLE:=MessagePack implementation for C
  28. URL:=https://github.com/msgpack/msgpack-c
  29. endef
  30. define Package/msgpack-c/description
  31. MessagePack is an efficient binary serialization format, which lets
  32. you exchange data among multiple languages like JSON, except that
  33. it's faster and smaller. Small integers are encoded into a single
  34. byte and short strings require only one extra byte in addition to
  35. the strings themselves.
  36. endef
  37. define Package/msgpack-c/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmsgpackc.so* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,msgpack-c))