0
0
mirror of https://github.com/openwrt/packages.git synced 2025-09-25 07:52:49 +00:00
Files
packages/libs/protobuf-c/Makefile
Rosen Penev 0ec080beff protobuf-c: fix host usage
Dependant packages mostly depend on a proto-c binary instead of
proto-gen-c. Add a symlink for it.

Remove no longer needed HOST options.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-08-23 07:03:18 +03:00

66 lines
1.8 KiB
Makefile

#
# 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:=1.5.2
PKG_RELEASE:=1
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
PKG_HASH:=e2c86271873a79c92b58fef7ebf8de1aa0df4738347a8bd5d4e65a80a16d0d24
PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:protobuf-c_project:protobuf-c
HOST_BUILD_DEPENDS:=protobuf/host
PKG_BUILD_DEPENDS:=protobuf
CMAKE_INSTALL:=1
CMAKE_SOURCE_SUBDIR:=build-cmake
CMAKE_BINARY_SUBDIR:=openwrt-build
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libprotobuf-c
TITLE:=Protocol Buffers library
SECTION:=libs
CATEGORY:=Libraries
URL:=https://github.com/protobuf-c/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
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_PROTOC=OFF
define Host/Install
$(call Host/Install/Default)
$(LN) $(STAGING_DIR_HOSTPKG)/bin/protoc-gen-c $(STAGING_DIR_HOSTPKG)/bin/protoc-c
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))
$(eval $(call HostBuild))