2 # Copyright (C) 2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=libprotobuf-c
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
:=53f251f14c597bdb087aecf0b63630f434d73f5a10fc1ac545073597535b9e74
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/protobuf-c-
$(PKG_VERSION
)
18 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/protobuf-c-
$(PKG_VERSION
)
20 PKG_MAINTAINER
:=Rosen Penev
<rosenp@gmail.com
>
21 PKG_LICENSE
:=BSD-2-Clause
22 PKG_LICENSE_FILES
:=LICENSE
24 HOST_BUILD_DEPENDS
:=protobuf
/host
25 PKG_BUILD_DEPENDS
:=protobuf
29 CMAKE_SOURCE_SUBDIR
:=build-cmake
31 include $(INCLUDE_DIR
)/package.mk
32 include $(INCLUDE_DIR
)/host-build.mk
33 include $(INCLUDE_DIR
)/cmake.mk
35 define Package
/libprotobuf-c
36 TITLE
:=Protocol Buffers library
39 URL
:=https
://github.com
/protobuf-c
/protobuf-c
42 define Package
/libprotobuf-c
/description
43 Runtime library to use Google Protocol Buffers from C applications.
44 Protocol Buffers are a way of encoding structured data in an efficient yet
45 extensible format. Google uses Protocol Buffers for almost
all of its
46 internal RPC protocols and file formats.
49 CMAKE_HOST_OPTIONS
+= \
50 -DBUILD_SHARED_LIBS
=ON \
51 -DCMAKE_SKIP_RPATH
=OFF \
52 -DCMAKE_INSTALL_RPATH
="${STAGING_DIR_HOSTPKG}/lib"
55 -DBUILD_SHARED_LIBS
=ON
57 define Package
/libprotobuf-c
/install
58 $(INSTALL_DIR
) $(1)/usr
/lib
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libprotobuf-c.so
* $(1)/usr
/lib
/
62 $(eval
$(call BuildPackage
,libprotobuf-c
))
63 $(eval
$(call HostBuild
))