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.

64 lines
1.7 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:=2014-06-30
  10. PKG_RELEASE:=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=6136f54b221ab8883731349d01f34b01812e391d
  16. PKG_INSTALL:=1
  17. PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libprotobuf-c
  20. TITLE:=Protocol Buffers library
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. URL:=http://code.google.com/p/protobuf-c/
  24. endef
  25. define Package/libprotobuf-c/description
  26. Runtime library to use Google Protocol Buffers from C applications.
  27. Protocol Buffers are a way of encoding structured data in an efficient yet
  28. extensible format. Google uses Protocol Buffers for almost all of its
  29. internal RPC protocols and file formats.
  30. endef
  31. CONFIGURE_ARGS += \
  32. --enable-shared \
  33. --enable-static \
  34. --disable-protoc
  35. define Build/Configure
  36. cd $(PKG_BUILD_DIR) && ./autogen.sh
  37. $(call Build/Configure/Default)
  38. endef
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include/
  41. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/
  44. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  46. endef
  47. define Package/libprotobuf-c/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/
  50. endef
  51. $(eval $(call BuildPackage,libprotobuf-c))