%global cpp_std 17 Name: grpc Version: 1.48.4 Release: 2%{?dist} License: Apache-2.0 Summary: RPC library and framework URL: https://github.com/grpc/grpc Source0: %{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: pkgconfig BuildRequires: protobuf-devel BuildRequires: openssl-devel BuildRequires: abseil-cpp-devel BuildRequires: c-ares-devel BuildRequires: re2-devel Requires: grpc-data = %{version}-%{release} %description gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services. The main usage scenarios: • Efficiently connecting polyglot services in microservices style architecture • Connecting mobile devices, browser clients to backend services • Generating efficient client libraries Core Features that make it awesome: • Idiomatic client libraries in 10 languages • Highly efficient on wire and with a simple service definition framework • Bi-directional streaming with http/2 based transport • Pluggable auth, tracing, load balancing and health checking This package provides the shared C core library. %files %license LICENSE NOTICE.txt %{_libdir}/libaddress_sorting.so.* %{_libdir}/libgpr.so.* %{_libdir}/libgrpc.so.* %{_libdir}/libgrpc_unsecure.so.* %{_libdir}/libupb.so.* # === data =============== %package data Summary: Data for gRPC bindings License: ASL 2.0 BuildArch: noarch Requires: ca-certificates %description data Common data for gRPC bindings: currently, this contains only a symbolic link to the system shared TLS certificates. %files data %license LICENSE NOTICE.txt %dir %{_datadir}/grpc %{_datadir}/grpc/roots.pem # === cpp ================ %package cpp Summary: C++ language bindings for gRPC License: ASL 2.0 Requires: grpc%{?_isa} = %{version}-%{release} Requires: grpc-cpp%{?_isa} = %{version}-%{release} %description cpp C++ language bindings for gRPC. %files cpp %{_libdir}/libgrpc++.so.* %{_libdir}/libgrpc++_alts.so.* %{_libdir}/libgrpc++_error_details.so.* %{_libdir}/libgrpc++_reflection.so.* %{_libdir}/libgrpc++_unsecure.so.* %{_libdir}/libgrpc_plugin_support.so.* %{_libdir}/libgrpcpp_channelz.so.* # === plugins ===================================== %package plugins Summary: Protocol buffers compiler plugins for gRPC License: ASL 2.0 Requires: grpc%{?_isa} = %{version}-%{release} Requires: grpc-cpp%{?_isa} = %{version}-%{release} Requires: protobuf-compiler %description plugins Plugins to the protocol buffers compiler to generate gRPC sources. %files plugins # These are for program use and do not offer a CLI for the end user, so they # should really be in %%{_libexecdir}; however, too many downstream users # expect them in $PATH to change this for the time being. %{_bindir}/grpc_*_plugin # === devel =================== %package devel Summary: Development files for gRPC library License: ASL 2.0 Requires: grpc%{?_isa} = %{version}-%{release} Requires: grpc-cpp%{?_isa} = %{version}-%{release} Requires: grpc-plugins%{?_isa} = %{version}-%{release} # grpc/impl/codegen/port_platform.h includes linux/version.h Requires: kernel-headers%{?_isa} # grpcpp/impl/codegen/config_protobuf.h includes google/protobuf/… #Requires: pkgconfig(protobuf) Requires: protobuf-devel # grpcpp/impl/codegen/sync.h includes absl/synchronization/mutex.h # grpc.pc has -labsl_[…] Requires: abseil-cpp-devel # grpc.pc has -lre2 #Requires: pkgconfig(re2) Requires: re2-devel # grpc.pc has -lcares #Requires: cmake(c-ares) Requires: c-ares-devel # grpc.pc has -lz #Requires: pkgconfig(zlib) Requires: zlib-devel %description devel Development headers and files for gRPC libraries %files devel %{_libdir}/libaddress_sorting.so %{_libdir}/libgpr.so %{_libdir}/libgrpc.so %{_libdir}/libgrpc_unsecure.so %{_libdir}/libupb.so %{_includedir}/grpc %{_libdir}/pkgconfig/gpr.pc %{_libdir}/pkgconfig/grpc.pc %{_libdir}/pkgconfig/grpc_unsecure.pc %{_libdir}/cmake/grpc # C++ files: %{_includedir}/grpc++ %{_includedir}/grpcpp %{_libdir}/libgrpc++.so %{_libdir}/libgrpc++_alts.so %{_libdir}/libgrpc++_error_details.so %{_libdir}/libgrpc++_reflection.so %{_libdir}/libgrpc++_unsecure.so %{_libdir}/libgrpc_plugin_support.so %{_libdir}/libgrpcpp_channelz.so %{_libdir}/pkgconfig/grpc++.pc %{_libdir}/pkgconfig/grpc++_unsecure.pc # ==== doc ==== %package doc Summary: Documentation and examples for gRPC BuildArch: noarch %description doc Documentation and examples for gRPC, including Markdown documentation sources for the following: • C (core) ○ API ○ Internals • C++ ○ API ○ Internals For rendered HTML documentation, please see https://grpc.io/docs/. %files doc %license LICENSE NOTICE.txt %{_pkgdocdir} # ==================== %prep %setup -q -n %{name}-%{version} %build %cmake \ -DgRPC_INSTALL:BOOL=ON \ -DCMAKE_CXX_STANDARD:STRING=%{cpp_std} \ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ -DgRPC_INSTALL_BINDIR:PATH=%{_bindir} \ -DgRPC_INSTALL_LIBDIR:PATH=%{_libdir} \ -DgRPC_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ -DgRPC_INSTALL_CMAKEDIR:PATH=%{_libdir}/cmake/grpc \ -DgRPC_INSTALL_SHAREDIR:PATH=%{_datadir}/grpc \ -DgRPC_ABSL_PROVIDER:STRING='package' \ -DgRPC_ZLIB_PROVIDER:STRING='package' \ -DgRPC_CARES_PROVIDER:STRING='package' \ -DgRPC_RE2_PROVIDER:STRING='package' \ -DgRPC_SSL_PROVIDER:STRING='package' \ -DgRPC_PROTOBUF_PROVIDER:STRING='package' \ -DgRPC_BUILD_CODEGEN:BOOL=ON \ -DgRPC_BUILD_GRPC_CPP_PLUGIN:BOOL=ON \ -DgRPC_BUILD_CSHARP_EXT:BOOL=OFF \ -DgRPC_BUILD_GRPC_CSHARP_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_GRPC_NODE_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_GRPC_PHP_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_GRPC_PYTHON_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_GRPC_RUBY_PLUGIN:BOOL=OFF \ -DgRPC_BUILD_TESTS:BOOL=OFF \ -DgRPC_BACKWARDS_COMPATIBILITY_MODE:BOOL=OFF %cmake_build %install %cmake_install # docs install -D -t '%{buildroot}%{_pkgdocdir}' -m 0644 -p AUTHORS *.md cp -rvp doc examples '%{buildroot}%{_pkgdocdir}' %check %changelog * Fri May 19 2023 Kim van der Riet - 1.48.4-2 - Removed separate grpc-cpp-devel package, combined with grpc-devel, and so aligns with the Fedora packaging. * Wed May 17 2023 Kim van der Riet - 1.48.4-1 - Initial build