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