Makefile 1.7 KB

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