protobuf-c: update to 1.4.1
[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.4.1
12 PKG_RELEASE:=1
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:=4cc4facd508172f3e0a4d3a8736225d472418aee35b4ad053384b137b220339f
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:=
21 PKG_LICENSE:=BSD-2-Clause
22 PKG_LICENSE_FILES:=LICENSE
23
24 HOST_BUILD_DEPENDS:=protobuf/host
25 PKG_BUILD_DEPENDS:=protobuf
26
27 CMAKE_INSTALL:=1
28 CMAKE_SOURCE_SUBDIR:=build-cmake
29
30 include $(INCLUDE_DIR)/package.mk
31 include $(INCLUDE_DIR)/host-build.mk
32 include $(INCLUDE_DIR)/cmake.mk
33
34 define Package/libprotobuf-c
35 TITLE:=Protocol Buffers library
36 SECTION:=libs
37 CATEGORY:=Libraries
38 URL:=https://github.com/protobuf-c/protobuf-c
39 endef
40
41 define Package/libprotobuf-c/description
42 Runtime library to use Google Protocol Buffers from C applications.
43 Protocol Buffers are a way of encoding structured data in an efficient yet
44 extensible format. Google uses Protocol Buffers for almost all of its
45 internal RPC protocols and file formats.
46 endef
47
48 CMAKE_HOST_OPTIONS += \
49 -DBUILD_SHARED_LIBS=OFF \
50 -DCMAKE_CXX_STANDARD=11 \
51 -DCMAKE_SKIP_RPATH=OFF \
52 -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
53
54 CMAKE_OPTIONS += \
55 -DBUILD_SHARED_LIBS=ON \
56 -DBUILD_PROTOC=OFF
57
58 define Package/libprotobuf-c/install
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,libprotobuf-c))
64 $(eval $(call HostBuild))
65