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.

67 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2011 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:=libprotobuf-c
  9. PKG_VERSION:=1.3.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
  15. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  17. PKG_LICENSE:=BSD-2c
  18. PKG_BUILD_DEPENDS:=protobuf-c/host
  19. HOST_BUILD_DEPENDS:=protobuf/host
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/host-build.mk
  24. define Package/libprotobuf-c
  25. TITLE:=Protocol Buffers library
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. URL:=https://github.com/protobuf-c/protobuf-c
  29. endef
  30. define Package/libprotobuf-c/description
  31. Runtime library to use Google Protocol Buffers from C applications.
  32. Protocol Buffers are a way of encoding structured data in an efficient yet
  33. extensible format. Google uses Protocol Buffers for almost all of its
  34. internal RPC protocols and file formats.
  35. endef
  36. CONFIGURE_ARGS += \
  37. --enable-shared \
  38. --enable-static \
  39. --disable-protoc
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/include/
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
  45. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  47. endef
  48. define Package/libprotobuf-c/install
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
  51. endef
  52. $(eval $(call BuildPackage,libprotobuf-c))
  53. $(eval $(call HostBuild))