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.

78 lines
1.8 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:=2.6.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
  13. PKG_MD5SUM:=11aaac2d704eef8efd1867a807865d85
  14. PKG_LICENSE:=BSD-3-Clause
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_BUILD_DEPENDS:=protobuf/host
  17. PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/host-build.mk
  21. define Package/protobuf
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A structured data encoding library
  25. URL:=http://code.google.com/p/protobuf/
  26. DEPENDS:=+zlib +libpthread +libstdcpp
  27. MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
  28. endef
  29. define Package/protobuf/description
  30. Protocol Buffers are a way of encoding structured data in an efficient
  31. yet extensible format. Google uses Protocol Buffers for almost all
  32. of its internal RPC protocols and file formats.
  33. endef
  34. CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
  35. define Build/InstallDev
  36. $(INSTALL_DIR) \
  37. $(1)/usr/lib \
  38. $(1)/usr/include
  39. $(CP) \
  40. $(PKG_INSTALL_DIR)/usr/include/* \
  41. $(1)/usr/include/
  42. $(CP) \
  43. $(PKG_INSTALL_DIR)/usr/lib/* \
  44. $(1)/usr/lib/
  45. endef
  46. define Package/protobuf/install
  47. $(INSTALL_DIR) \
  48. $(1)/usr/lib
  49. $(CP) \
  50. $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
  51. $(1)/usr/lib/
  52. $(CP) \
  53. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
  54. $(1)/usr/lib/
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
  57. $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,protobuf))
  60. $(eval $(call HostBuild))