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.

65 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libprotobuf-c
  9. PKG_VERSION:=1.4.0
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=26d98ee9bf18a6eba0d3f855ddec31dbe857667d269bc0b6017335572f85bbcb
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
  15. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
  16. PKG_MAINTAINER:=
  17. PKG_LICENSE:=BSD-2-Clause
  18. PKG_LICENSE_FILES:=LICENSE
  19. HOST_BUILD_DEPENDS:=protobuf/host
  20. PKG_BUILD_DEPENDS:=protobuf
  21. CMAKE_INSTALL:=1
  22. CMAKE_SOURCE_SUBDIR:=build-cmake
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/host-build.mk
  25. include $(INCLUDE_DIR)/cmake.mk
  26. define Package/libprotobuf-c
  27. TITLE:=Protocol Buffers library
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. URL:=https://github.com/protobuf-c/protobuf-c
  31. endef
  32. define Package/libprotobuf-c/description
  33. Runtime library to use Google Protocol Buffers from C applications.
  34. Protocol Buffers are a way of encoding structured data in an efficient yet
  35. extensible format. Google uses Protocol Buffers for almost all of its
  36. internal RPC protocols and file formats.
  37. endef
  38. CMAKE_HOST_OPTIONS += \
  39. -DBUILD_SHARED_LIBS=ON \
  40. -DCMAKE_CXX_STANDARD=11 \
  41. -DCMAKE_SKIP_RPATH=OFF \
  42. -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
  43. CMAKE_OPTIONS += \
  44. -DBUILD_SHARED_LIBS=ON \
  45. -DBUILD_PROTOC=OFF
  46. define Package/libprotobuf-c/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/
  49. endef
  50. $(eval $(call BuildPackage,libprotobuf-c))
  51. $(eval $(call HostBuild))