2 # spec file for package grpc
4 # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
15 # Please submit bugfixes or comments via https://bugs.opensuse.org/
20 %define src_install_dir /usr/src/%{name}
21 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
25 Summary: HTTP/2-based Remote Procedure Call implementation
27 Group: Development/Tools/Building
29 Source: https://github.com/grpc/grpc/archive/v%{version}.tar.gz
30 Source1001: grpc.manifest
31 Source10: support_lib64_directory.patch
33 BuildRequires: python-cython
34 BuildRequires: python-devel
35 BuildRequires: python-setuptools
36 # BuildRequires: python-rpm-macros
38 BuildRequires: gcc-c++
39 BuildRequires: pkg-config
40 BuildRequires: pkgconfig(libcares)
41 BuildRequires: pkgconfig(openssl1.1) >= 1.0.1
42 BuildRequires: pkgconfig(protobuf) >= 3.5
43 BuildRequires: pkgconfig(zlib)
44 BuildRequires: pkgconfig(re2)
45 BuildRequires: abseil-cpp-devel
47 BuildRoot: %{_tmppath}/%{name}-%{version}-build
50 The reference implementation of the gRPC protocol, done on top of
51 HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
52 Protocol Buffers as the Interface Definition Language by default.
55 Summary: HTTP/2-based Remote Procedure Call implementation
56 Group: System/Libraries
58 %description -n %lname
59 The reference implementation of the gRPC protocol, done on top of
60 HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
61 Protocol Buffers as the Interface Definition Language by default.
64 Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
65 Group: Development/Tools/Building
66 Requires: %lname = %version
69 This subpackage contains libraries and header files for developing
70 applications that want to make use of the gRPC reference implementation.
75 %{__patch} -p1 < %{SOURCE10}
78 CFLAGS+=" -Wno-error -Wno-unused-parameter"
79 CXXFLAGS+=" -Wno-error -Wno-unused-parameter"
84 cmake ../.. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
85 -DINCLUDE_INSTALL_DIR=%{_includedir} \
86 -DLIB_INSTALL_DIR=%{_libdir} \
87 -DBUILD_SHARED_LIBS=ON \
89 -DgRPC_ABSL_PROVIDER=package \
90 -DgRPC_CARES_PROVIDER=package \
91 -DgRPC_RE2_PROVIDER=package \
92 -DgRPC_PROTOBUF_PROVIDER=package \
93 -DgRPC_SSL_PROVIDER=package \
94 -DgRPC_ZLIB_PROVIDER=package
101 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
103 rm -rf %{buildroot}%{_libdir}/cmake
104 rm -rf %{buildroot}%{_datadir}/grpc/roots.pem
106 %post -n %lname -p /sbin/ldconfig
107 %postun -n %lname -p /sbin/ldconfig
110 %defattr(-,root,root)
111 %_libdir/libaddress_sorting.so.*
113 %_libdir/libgpr*.so.*
114 %_libdir/libgrpc*.so.*
117 %defattr(-,root,root)
121 %_libdir/pkgconfig/*.pc