From 97eac718c0280f2eaa8e4ba13265c143a692af6e Mon Sep 17 00:00:00 2001 From: Jacob Siverskog Date: Mon, 14 Jul 2014 15:57:06 +0200 Subject: [PATCH] protobuf-c: import from packages, bump version. Signed-off-by: Jacob Siverskog --- libs/protobuf-c/Makefile | 62 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 libs/protobuf-c/Makefile diff --git a/libs/protobuf-c/Makefile b/libs/protobuf-c/Makefile new file mode 100644 index 0000000000..4a28557c76 --- /dev/null +++ b/libs/protobuf-c/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libprotobuf-c +PKG_VERSION:=2014-06-30 +PKG_RELEASE:=$(PKG_SOURCE_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=6136f54b221ab8883731349d01f34b01812e391d + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libprotobuf-c + TITLE:=Protocol Buffers library + SECTION:=libs + CATEGORY:=Libraries + URL:=http://code.google.com/p/protobuf-c/ +endef + +define Package/libprotobuf-c/description + Runtime library to use Google Protocol Buffers from C applications. + Protocol Buffers are a way of encoding structured data in an efficient yet + extensible format. Google uses Protocol Buffers for almost all of its + internal RPC protocols and file formats. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-protoc + +define Build/Configure + cd $(PKG_BUILD_DIR) && ./autogen.sh + $(call Build/Configure/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.{a,la,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ +endef + +define Package/libprotobuf-c/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libprotobuf-c))