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.

83 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2007 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.5.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
  13. PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
  14. PKG_BUILD_DEPENDS:=protobuf/host
  15. PKG_USE_MIPS16:=0
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/host-build.mk
  19. define Package/protobuf
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=A structured data encoding library
  23. URL:=http://code.google.com/p/protobuf/
  24. DEPENDS:=+zlib +libpthread +libstdcpp
  25. MAINTAINER:=Obinou <obconseil@gmail.com>
  26. endef
  27. define Package/protobuf/description
  28. Protocol Buffers are a way of encoding structured data in an efficient
  29. yet extensible format. Google uses Protocol Buffers for almost all
  30. of its internal RPC protocols and file formats.
  31. endef
  32. define Host/Compile
  33. $(MAKE) -C $(HOST_BUILD_DIR)
  34. endef
  35. define Host/Install
  36. $(MAKE) -C $(HOST_BUILD_DIR) install
  37. endef
  38. CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
  39. define Build/InstallDev
  40. $(INSTALL_DIR) \
  41. $(1)/usr/lib \
  42. $(1)/usr/include
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)/usr/include/* \
  45. $(1)/usr/include/
  46. $(CP) \
  47. $(PKG_INSTALL_DIR)/usr/lib/* \
  48. $(1)/usr/lib/
  49. endef
  50. define Package/protobuf/install
  51. $(INSTALL_DIR) \
  52. $(1)/usr/lib
  53. $(CP) \
  54. $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
  55. $(1)/usr/lib/
  56. $(CP) \
  57. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
  58. $(1)/usr/lib/
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
  61. $(1)/usr/lib/
  62. endef
  63. $(eval $(call BuildPackage,protobuf))
  64. $(eval $(call HostBuild))