treewide: use $(STAGING_DIR)/host instead of $(STAGING_DIR_HOST), sync with changes...
[feed/packages.git] / libs / protobuf / Makefile
1 #
2 # Copyright (C) 2007-2015 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:=protobuf
11 PKG_VERSION:=2.6.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
16 PKG_MD5SUM:=11aaac2d704eef8efd1867a807865d85
17
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_BUILD_DEPENDS:=protobuf/host
22 PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/host-build.mk
28
29 define Package/protobuf
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=A structured data encoding library
33 URL:=http://code.google.com/p/protobuf/
34 DEPENDS:=+zlib +libpthread +libstdcpp
35 MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
36 endef
37
38 define Package/protobuf/description
39 Protocol Buffers are a way of encoding structured data in an efficient
40 yet extensible format. Google uses Protocol Buffers for almost all
41 of its internal RPC protocols and file formats.
42 endef
43
44 CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR)/host/bin/protoc
45
46 define Build/InstallDev
47 $(INSTALL_DIR) \
48 $(1)/usr/lib \
49 $(1)/usr/include
50
51 $(CP) \
52 $(PKG_INSTALL_DIR)/usr/include/* \
53 $(1)/usr/include/
54
55 $(CP) \
56 $(PKG_INSTALL_DIR)/usr/lib/* \
57 $(1)/usr/lib/
58 endef
59
60 define Package/protobuf/install
61 $(INSTALL_DIR) \
62 $(1)/usr/lib
63
64 $(CP) \
65 $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \
66 $(1)/usr/lib/
67
68 $(CP) \
69 $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
70 $(1)/usr/lib/
71
72 $(CP) \
73 $(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
74 $(1)/usr/lib/
75 endef
76
77 $(eval $(call BuildPackage,protobuf))
78 $(eval $(call HostBuild))