grpc/grpc.spec

217 lines
6.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package grpc
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Accepting request 648212 from home:tbechtold:branches:devel:tools - update to 1.15.1: Core * Document SSL portability and performance considerations. See https://github.com/grpc/grpc/blob/master/doc/ssl-performance.md . * Simplify call arena size growth. (#16396) * Make gRPC buildable with AIX and Solaris (no official support). (#15926) * PF: Check connectivity state before watching. (#16306) * Added system roots feature to load roots from OS trust store. (#16083) * Fix c-ares compilation under windows (but doesn't yet enable windows DNS queries), and then enables address sorting on Windows. (#16163) * Fix re-resolution in pick first. (#16076) * Allow error strings in final_info to propagate to filters on call destruction. (#16104) * Add resolver executor . (#16010) * Data race fix for lockfree_event. (#16053) * Channelz: Expose new Core API. (#16022) C++ * cmake: disable assembly optimizations only when necessary. (#16415) * C++ sync server: Return status RESOURCE_EXHAUSTED if no thread quota available. (#16356) * Use correct target name for gflags-config.cmake. (#16343) * Make should generate pkg-config file for gpr as well. (#15295) * Restrict the number of threads in C++ sync server. (#16217) * Allow reset of connection backoff. (#16225) C# * Add experimental support for Xamarin.Android and Xamarin.iOS, added Helloworld example for Xamarin. See https://github.com/grpc/grpc/tree/master/src/csharp/experimental. * Add experimental support for Unity Android and iOS. See https://github.com/grpc/grpc/tree/master/src/csharp/experimental. OBS-URL: https://build.opensuse.org/request/show/648212 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=31
2018-11-11 18:43:52 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define lver 19
%define lverp 1
%define src_install_dir /usr/src/%name
Name: grpc
Version: 1.41.1
Release: 0
Summary: HTTP/2-based Remote Procedure Call implementation
License: Apache-2.0
Group: Development/Tools/Building
URL: https://grpc.io/
Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
Source2: %name-rpmlintrc
Patch1: grpc-correct-pkgconfig-path.patch
Patch2: grpc-cxx17.patch
BuildRequires: abseil-cpp-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: zypper
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(openssl) >= 1.0.1
BuildRequires: pkgconfig(protobuf) >= 3.8.0
BuildRequires: pkgconfig(re2)
BuildRequires: pkgconfig(zlib)
%description
The reference implementation of the gRPC protocol, done on top of
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
Protocol Buffers as the Interface Definition Language by default.
%package -n libgrpc%lver
Summary: HTTP/2-based Remote Procedure Call implementation
Group: System/Libraries
%description -n libgrpc%lver
The reference implementation of the gRPC protocol, done on top of
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
Protocol Buffers as the Interface Definition Language by default.
%package -n libgrpc++%lverp
Summary: HTTP/2-based Remote Procedure Call implementation
Group: System/Libraries
%if "%lverp" == "1"
# prior error in packaging
Conflicts: libgrpc6
%endif
%description -n libgrpc++%lverp
The reference implementation of the gRPC protocol, done on top of
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
Protocol Buffers as the Interface Definition Language by default.
%package -n libgrpc_plugin_support1_41
Summary: HTTP/2-based Remote Procedure Call implementation - plugin support
Group: System/Libraries
%description -n libgrpc_plugin_support1_41
The reference implementation of the gRPC protocol, done on top of
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
Protocol Buffers as the Interface Definition Language by default.
This package provides the shared library to support plugins for grpc.
%package -n libupb%lver
Summary: A small protobuf implementation in C
Group: System/Libraries
%description -n libupb%lver
μpb (often written 'upb') is a small protobuf implementation written in C.
upb generates a C API for creating, parsing, and serializing messages as
declared in .proto files. upb is heavily arena-based: all messages always live
in an arena (note: the arena can live in stack or static memory if desired).
%package devel
Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
Group: Development/Tools/Building
Requires: libgrpc%lver = %version
Requires: libgrpc++%lverp = %version
Requires: libgrpc_plugin_support1_41 = %version
Requires: pkgconfig(libcares)
Requires: pkgconfig(re2)
%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of the gRPC reference implementation.
%package -n upb-devel
Summary: Developmnt files for upb
Group: Development/Tools/Building
Requires: libupb%lver = %version
%description -n upb-devel
μpb (often written 'upb') is a small protobuf implementation written in C.
upb generates a C API for creating, parsing, and serializing messages as
declared in .proto files. upb is heavily arena-based: all messages always live
in an arena (note: the arena can live in stack or static memory if desired).
This package provides development files for upb.
%package source
Summary: Source code of gRPC
Group: Development/Sources
BuildArch: noarch
%description -n grpc-source
This subpackage contains source code of the gRPC reference implementation.
%prep
%autosetup -p1
rm -Rf third_party/abseil-cpp/
Accepting request 610355 from home:tbechtold:branches:devel:tools - update to 1.12.0: Core: * Update protobuf submodule to 3.5.2 (#15114) * Make GrpcBuffer{Reader|Writer} Public (#14541) * Compile Out Tracers Option (#15108) * Fix bug in an address sorting comparison (#15208) * Fix: Check retry timer before starting resolving (#15156) * Fix c-ares resolution with default authority (#15073) * Fix c-ares resolver crash when DNS server unreachable (#15134) * Performance: Avoid low severity log message construction (#14945) * Peformance: Enable SIO_LOOPBACK_FAST_PATH on Windows (#14905) C#: * Add RpcException.StatusCode property (#15140) * Improvements to C# build instructions (#15178) Python: * Eliminate grpcio package dependency on protobuf package (#15034). Please pay extra attention if you are using gRPC with Protocol Buffers and your deployment scripts do not explicitly list the correct dependencies and used to rely on the transitive Python package dependency from grpcio to protobuf. * A new grpc.Channel.close method is introduced and correct use of gRPC Python now requires that channels be closed after use. No existing code should observably break when upgrading to 1.12 but code that creates channels but does not close them will not be supported in 1.13 and later. Core: * Fix: Check retry timer before starting resolving (#15156) * Fix c-ares resolution with default authority (#15073) * Fix c-ares resolver crash when DNS server unreachable (#15134) * Add core underpinnings for TLS session ticket support (#14483) * Experimental support for configurable retries (use at your own risk) (#10684) * Fail calls with wait_for_ready=false on transient resolver failure (#14733) OBS-URL: https://build.opensuse.org/request/show/610355 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=20
2018-05-18 15:34:36 +02:00
%build
%define _lto_cflags %nil
# protoc is invoked strangely; make it happy with this dir or it will assert()
mkdir -p third_party/protobuf/src
export CFLAGS="%optflags -Wno-error"
export CXXFLAGS="$CFLAGS"
%cmake -DgRPC_INSTALL=ON \
-DgRPC_INSTALL_LIBDIR:PATH="%_lib" \
-DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir/cmake/grpc" \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DZLIB_LIBRARY=%{_libdir}/libz.so \
-DgRPC_ZLIB_PROVIDER=package
%cmake_build
%install
b="%buildroot"
%cmake_install
pushd "$b/usr"
rm -fv lib/*.a share/grpc/*.pem
popd
# Install sources
pushd %__builddir
rm -fv CMakeFiles/*.log
make clean
find . -type f "(" -name "*.so" -o -name "*.o" -o -name ".git*" -o \
-name "*.bin" -o -name "*.out" ")" -exec rm -Rfv {} +
popd
# Don't include abseil-cpp in sources
rm -fr third_party/abseil-cpp/*
mkdir -p "%buildroot/%src_install_dir"
cp -r * "%buildroot/%src_install_dir"
%fdupes %buildroot/%_prefix
# Checks cannot be run because of `make clean` above
#%%check
%post -n libgrpc%lver -p /sbin/ldconfig
%postun -n libgrpc%lver -p /sbin/ldconfig
%post -n libgrpc++%lverp -p /sbin/ldconfig
%postun -n libgrpc++%lverp -p /sbin/ldconfig
%post -n libgrpc_plugin_support1_41 -p /sbin/ldconfig
%postun -n libgrpc_plugin_support1_41 -p /sbin/ldconfig
%post -n libupb%lver -p /sbin/ldconfig
%postun -n libupb%lver -p /sbin/ldconfig
%files -n libgrpc%lver
%_libdir/libaddress_sorting.so.%{lver}*
%_libdir/libgpr*.so.%{lver}*
%_libdir/libgrpc*.so.%{lver}*
%files -n libgrpc++%lverp
%_libdir/libgrpc++*.so.%{lverp}*
%_libdir/libgrpcpp_channelz.so.%{lverp}*
%files -n libgrpc_plugin_support1_41
%_libdir/libgrpc_plugin_support.so.1.41*
%files -n libupb%lver
%_libdir/libupb*.so.%{lver}*
%files devel
%license LICENSE
%_bindir/*
%_includedir/*
%_libdir/pkgconfig/*.pc
%_libdir/*.so
%_libdir/cmake/grpc/
%files -n upb-devel
%_libdir/libupb*.so
%files source
%src_install_dir
%changelog