2017-04-19 15:05:25 +02:00
|
|
|
#
|
|
|
|
# spec file for package grpc
|
|
|
|
#
|
2022-02-09 03:33:06 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2017-04-19 15:05:25 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-11-11 18:43:52 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-19 15:05:25 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-02-15 22:28:41 +01:00
|
|
|
%define lver 22
|
|
|
|
%define lverp 1_44
|
2019-08-22 12:38:39 +02:00
|
|
|
%define src_install_dir /usr/src/%name
|
2017-04-19 15:05:25 +02:00
|
|
|
Name: grpc
|
2022-02-15 22:28:41 +01:00
|
|
|
Version: 1.44.0
|
2017-04-19 15:05:25 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
2017-12-12 01:04:33 +01:00
|
|
|
License: Apache-2.0
|
2017-04-19 15:05:25 +02:00
|
|
|
Group: Development/Tools/Building
|
2019-08-22 12:38:39 +02:00
|
|
|
URL: https://grpc.io/
|
2019-12-17 01:10:25 +01:00
|
|
|
Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
|
|
|
|
Source2: %name-rpmlintrc
|
2020-10-11 19:32:37 +02:00
|
|
|
Patch1: grpc-correct-pkgconfig-path.patch
|
2021-06-03 01:13:42 +02:00
|
|
|
Patch2: grpc-cxx17.patch
|
2020-10-27 13:32:37 +01:00
|
|
|
BuildRequires: abseil-cpp-devel
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: cmake
|
2019-10-03 00:19:38 +02:00
|
|
|
BuildRequires: fdupes
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: pkg-config
|
2019-08-22 12:38:39 +02:00
|
|
|
BuildRequires: zypper
|
2017-12-12 01:04:33 +01:00
|
|
|
BuildRequires: pkgconfig(libcares)
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: pkgconfig(openssl) >= 1.0.1
|
2019-06-05 22:25:37 +02:00
|
|
|
BuildRequires: pkgconfig(protobuf) >= 3.8.0
|
2020-09-10 17:19:49 +02:00
|
|
|
BuildRequires: pkgconfig(re2)
|
2017-04-19 15:05:25 +02:00
|
|
|
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.
|
|
|
|
|
2019-10-03 00:19:38 +02:00
|
|
|
%package -n libgrpc%lver
|
2017-04-19 15:05:25 +02:00
|
|
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2019-10-03 00:19:38 +02:00
|
|
|
%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
|
2017-04-19 15:05:25 +02:00
|
|
|
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.
|
|
|
|
|
2022-02-15 22:28:41 +01:00
|
|
|
%package -n libgrpc_plugin_support1_44
|
2020-09-10 17:19:49 +02:00
|
|
|
Summary: HTTP/2-based Remote Procedure Call implementation - plugin support
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2022-02-15 22:28:41 +01:00
|
|
|
%description -n libgrpc_plugin_support1_44
|
2020-09-10 17:19:49 +02:00
|
|
|
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.
|
|
|
|
|
2020-09-29 07:54:34 +02:00
|
|
|
%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).
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
|
|
|
|
Group: Development/Tools/Building
|
2019-10-03 00:19:38 +02:00
|
|
|
Requires: libgrpc%lver = %version
|
|
|
|
Requires: libgrpc++%lverp = %version
|
2022-02-15 22:28:41 +01:00
|
|
|
Requires: libgrpc_plugin_support1_44 = %version
|
2022-02-09 03:33:06 +01:00
|
|
|
Requires: libupb%lver = %version
|
2020-10-11 19:32:37 +02:00
|
|
|
Requires: pkgconfig(libcares)
|
2020-09-18 23:58:49 +02:00
|
|
|
Requires: pkgconfig(re2)
|
2017-04-19 15:05:25 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This subpackage contains libraries and header files for developing
|
|
|
|
applications that want to make use of the gRPC reference implementation.
|
|
|
|
|
2020-09-29 07:54:34 +02:00
|
|
|
%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.
|
|
|
|
|
2019-01-13 00:58:01 +01:00
|
|
|
%package source
|
|
|
|
Summary: Source code of gRPC
|
2019-04-15 10:16:02 +02:00
|
|
|
Group: Development/Sources
|
2019-01-13 00:58:01 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description -n grpc-source
|
|
|
|
This subpackage contains source code of the gRPC reference implementation.
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%prep
|
2019-12-17 01:10:25 +01:00
|
|
|
%autosetup -p1
|
2020-10-27 13:32:37 +01:00
|
|
|
rm -Rf third_party/abseil-cpp/
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2018-05-18 15:34:36 +02:00
|
|
|
%build
|
2019-08-22 20:39:09 +02:00
|
|
|
%define _lto_cflags %nil
|
2019-08-22 12:38:39 +02:00
|
|
|
# protoc is invoked strangely; make it happy with this dir or it will assert()
|
|
|
|
mkdir -p third_party/protobuf/src
|
|
|
|
|
2019-08-22 20:39:09 +02:00
|
|
|
export CFLAGS="%optflags -Wno-error"
|
|
|
|
export CXXFLAGS="$CFLAGS"
|
2020-10-11 19:32:37 +02:00
|
|
|
%cmake -DgRPC_INSTALL=ON \
|
|
|
|
-DgRPC_INSTALL_LIBDIR:PATH="%_lib" \
|
2020-10-27 13:32:37 +01:00
|
|
|
-DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir/cmake/grpc" \
|
2020-12-06 20:23:27 +01:00
|
|
|
-DgRPC_ABSL_PROVIDER=package \
|
2020-10-11 19:32:37 +02:00
|
|
|
-DgRPC_CARES_PROVIDER=package \
|
|
|
|
-DgRPC_PROTOBUF_PROVIDER=package \
|
|
|
|
-DgRPC_RE2_PROVIDER=package \
|
|
|
|
-DgRPC_SSL_PROVIDER=package \
|
2020-12-06 20:23:27 +01:00
|
|
|
-DZLIB_LIBRARY=%{_libdir}/libz.so \
|
2020-09-10 17:19:49 +02:00
|
|
|
-DgRPC_ZLIB_PROVIDER=package
|
|
|
|
%cmake_build
|
2017-04-19 15:05:25 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
b="%buildroot"
|
2020-09-10 17:19:49 +02:00
|
|
|
%cmake_install
|
2019-03-16 19:21:23 +01:00
|
|
|
|
2018-05-18 16:55:41 +02:00
|
|
|
pushd "$b/usr"
|
2018-05-18 17:11:37 +02:00
|
|
|
rm -fv lib/*.a share/grpc/*.pem
|
2018-05-18 16:55:41 +02:00
|
|
|
popd
|
|
|
|
|
2019-01-13 00:58:01 +01:00
|
|
|
# Install sources
|
2020-09-10 17:19:49 +02:00
|
|
|
pushd %__builddir
|
2021-08-30 19:53:48 +02:00
|
|
|
rm -fv CMakeFiles/*.log
|
2019-10-12 13:07:48 +02:00
|
|
|
make clean
|
2021-08-30 19:53:48 +02:00
|
|
|
find . -type f "(" -name "*.so" -o -name "*.o" -o -name ".git*" -o \
|
|
|
|
-name "*.bin" -o -name "*.out" ")" -exec rm -Rfv {} +
|
2020-09-10 17:19:49 +02:00
|
|
|
popd
|
|
|
|
# Don't include abseil-cpp in sources
|
|
|
|
rm -fr third_party/abseil-cpp/*
|
|
|
|
|
2019-08-22 12:38:39 +02:00
|
|
|
mkdir -p "%buildroot/%src_install_dir"
|
2019-10-12 13:07:48 +02:00
|
|
|
cp -r * "%buildroot/%src_install_dir"
|
2019-01-13 00:58:01 +01:00
|
|
|
|
2019-10-03 00:19:38 +02:00
|
|
|
%fdupes %buildroot/%_prefix
|
|
|
|
|
2020-12-06 20:23:27 +01:00
|
|
|
# Checks cannot be run because of `make clean` above
|
|
|
|
#%%check
|
|
|
|
|
2019-10-03 00:19:38 +02:00
|
|
|
%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
|
2022-02-15 22:28:41 +01:00
|
|
|
%post -n libgrpc_plugin_support1_44 -p /sbin/ldconfig
|
|
|
|
%postun -n libgrpc_plugin_support1_44 -p /sbin/ldconfig
|
2020-11-11 14:29:58 +01:00
|
|
|
%post -n libupb%lver -p /sbin/ldconfig
|
|
|
|
%postun -n libupb%lver -p /sbin/ldconfig
|
2019-10-03 00:19:38 +02:00
|
|
|
|
|
|
|
%files -n libgrpc%lver
|
|
|
|
%_libdir/libaddress_sorting.so.%{lver}*
|
|
|
|
%_libdir/libgpr*.so.%{lver}*
|
|
|
|
%_libdir/libgrpc*.so.%{lver}*
|
2018-05-18 16:55:41 +02:00
|
|
|
|
2019-10-03 00:19:38 +02:00
|
|
|
%files -n libgrpc++%lverp
|
2022-02-09 03:33:06 +01:00
|
|
|
%_libdir/libgrpc++*.so.*
|
|
|
|
%_libdir/libgrpcpp_channelz.so.*
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2022-02-15 22:28:41 +01:00
|
|
|
%files -n libgrpc_plugin_support1_44
|
|
|
|
%_libdir/libgrpc_plugin_support.so.1.44*
|
2020-09-10 17:19:49 +02:00
|
|
|
|
2020-09-29 07:54:34 +02:00
|
|
|
%files -n libupb%lver
|
|
|
|
%_libdir/libupb*.so.%{lver}*
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%files devel
|
2018-03-28 16:49:33 +02:00
|
|
|
%license LICENSE
|
2017-04-19 15:05:25 +02:00
|
|
|
%_bindir/*
|
|
|
|
%_includedir/*
|
|
|
|
%_libdir/pkgconfig/*.pc
|
2018-05-18 16:55:41 +02:00
|
|
|
%_libdir/*.so
|
2020-09-10 17:19:49 +02:00
|
|
|
%_libdir/cmake/grpc/
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2020-09-29 07:54:34 +02:00
|
|
|
%files -n upb-devel
|
|
|
|
%_libdir/libupb*.so
|
|
|
|
|
2019-01-13 00:58:01 +01:00
|
|
|
%files source
|
2019-08-22 12:38:39 +02:00
|
|
|
%src_install_dir
|
2019-01-13 00:58:01 +01:00
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%changelog
|