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.

82 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. endef
  37. CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
  38. define Build/InstallDev
  39. $(INSTALL_DIR) \
  40. $(1)/usr/lib \
  41. $(1)/usr/include
  42. $(CP) \
  43. $(PKG_INSTALL_DIR)/usr/include/* \
  44. $(1)/usr/include/
  45. $(CP) \
  46. $(PKG_INSTALL_DIR)/usr/lib/* \
  47. $(1)/usr/lib/
  48. endef
  49. define Package/protobuf/install
  50. $(INSTALL_DIR) \
  51. $(1)/usr/lib
  52. $(CP) \
  53. $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
  54. $(1)/usr/lib/
  55. $(CP) \
  56. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
  57. $(1)/usr/lib/
  58. $(CP) \
  59. $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
  60. $(1)/usr/lib/
  61. endef
  62. $(eval $(call BuildPackage,protobuf))
  63. $(eval $(call HostBuild))