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.

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