void-packages/srcpkgs/grpc/template

49 lines
1.4 KiB
Bash

# Template file for 'grpc'
pkgname=grpc
version=1.56.0
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON
-DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package
-DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package
-DgRPC_ABSL_PROVIDER=package -DgRPC_RE2_PROVIDER=package"
hostmakedepends="protobuf pkg-config"
_devel_depends="c-ares-devel re2-devel zlib-devel openssl-devel abseil-cpp-devel"
makedepends="libprotoc-devel protobuf-devel gperftools-devel ${_devel_depends}"
short_desc="High performance, open source, general RPC framework"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/grpc/grpc"
distfiles="${homepage}/archive/v${version}/${pkgname}-${version}.tar.gz"
checksum=e034992a0b464042021f6d440f2090acc2422c103a322b0844e3921ccea981dc
if [ "$CROSS_BUILD" ]; then
# need host grpc_cpp_plugin
hostmakedepends+=" grpc"
configure_args+=" -DProtobuf_PROTOC_EXECUTABLE=/usr/bin/protoc"
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
configure_args+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic"
fi
libgrpc_package() {
short_desc+=" - libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
vmove usr/share
}
}
grpc-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} ${_devel_depends}
protobuf-devel"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
}
}