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.

107 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2007-2015 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:=protobuf
  9. PKG_VERSION:=3.8.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=ddc96d83f3b7417da53bce2510b94ad2796465ef8763f7a4e82089157efe97aa
  14. PKG_MAINTAINER:=Ken Keys <kkeys@caida.org>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_DEPENDS:=protobuf/host
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/host-build.mk
  22. define Package/protobuf/Default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=A structured data encoding library
  26. URL:=https://github.com/google/protobuf
  27. DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
  28. endef
  29. define Package/protobuf
  30. $(call Package/protobuf/Default)
  31. DEPENDS+=+protobuf-lite
  32. endef
  33. define Package/protobuf-lite
  34. $(call Package/protobuf/Default)
  35. endef
  36. define Package/protobuf/description/Default
  37. Protocol Buffers are a way of encoding structured data in an efficient
  38. yet extensible format. Google uses Protocol Buffers for almost all
  39. of its internal RPC protocols and file formats.
  40. endef
  41. define Package/protobuf/description
  42. $(call Package/protobuf/description/Default)
  43. This package provides the libprotoc, libprotobuf, and libprotobuf-lite
  44. libraries. For a much smaller protobuf package, see "protobuf-lite".
  45. endef
  46. define Package/protobuf-lite/description
  47. $(call Package/protobuf/description/Default)
  48. This package provides the libprotobuf-lite library.
  49. endef
  50. CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
  51. define Build/InstallDev
  52. $(INSTALL_DIR) \
  53. $(1)/usr/lib \
  54. $(1)/usr/include
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/include/* \
  57. $(1)/usr/include/
  58. $(CP) \
  59. $(PKG_INSTALL_DIR)/usr/lib/* \
  60. $(1)/usr/lib/
  61. endef
  62. define Package/protobuf-lite/install
  63. $(INSTALL_DIR) \
  64. $(1)/usr/lib
  65. $(CP) \
  66. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
  67. $(1)/usr/lib/
  68. endef
  69. define Package/protobuf/install
  70. $(INSTALL_DIR) \
  71. $(1)/usr/lib
  72. $(CP) \
  73. $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
  74. $(1)/usr/lib/
  75. $(CP) \
  76. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
  77. $(1)/usr/lib/
  78. endef
  79. $(eval $(call BuildPackage,protobuf))
  80. $(eval $(call BuildPackage,protobuf-lite))
  81. $(eval $(call HostBuild))