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 Source101: 0001-Change-install-command-at-Makefile.patch
31 Source102: 0002-Migrate-to-openssl-1.1.patch
32 Source103: 0003-tizen_6_build-Rename-gettid-functions.patch
33 Source1001: grpc.manifest
34 BuildRequires: python-cython
35 BuildRequires: python-devel
36 BuildRequires: python-setuptools
37 # BuildRequires: python-rpm-macros
39 BuildRequires: gcc-c++
40 BuildRequires: pkg-config
41 BuildRequires: pkgconfig(libcares)
42 BuildRequires: pkgconfig(openssl1.1) >= 1.0.1
43 BuildRequires: pkgconfig(protobuf) >= 3.5
44 BuildRequires: pkgconfig(zlib)
45 BuildRoot: %{_tmppath}/%{name}-%{version}-build
48 The reference implementation of the gRPC protocol, done on top of
49 HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
50 Protocol Buffers as the Interface Definition Language by default.
53 Summary: HTTP/2-based Remote Procedure Call implementation
54 Group: System/Libraries
56 %description -n %lname
57 The reference implementation of the gRPC protocol, done on top of
58 HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
59 Protocol Buffers as the Interface Definition Language by default.
62 Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
63 Group: Development/Tools/Building
64 Requires: %lname = %version
67 This subpackage contains libraries and header files for developing
68 applications that want to make use of the gRPC reference implementation.
73 %{__patch} -p1 < %{SOURCE101}
74 %{__patch} -p1 < %{SOURCE102}
75 %{__patch} -p1 < %{SOURCE103}
78 make %{?_smp_mflags} STRIP=/bin/true V=1 VERBOSE=1 \
79 CFLAGS="%optflags -Wno-error" CXXFLAGS="%optflags -Wno-error"
83 make prefix="$b/%_prefix" STRIP=/bin/true V=1 VERBOSE=1 install
84 find "$b/%_includedir" -type f -exec chmod a-x {} +
86 rm -fv lib/*.a share/grpc/*.pem
87 perl -i -pe 's{^prefix=.*}{prefix=%_prefix}' lib/pkgconfig/*.pc
88 perl -i -pe 's{^libdir=.*}{libdir=%_libdir}' lib/pkgconfig/*.pc
89 if test ! -d lib64 && test "%_lib" = lib64; then
94 %post -n %lname -p /sbin/ldconfig
95 %postun -n %lname -p /sbin/ldconfig
99 %_libdir/libaddress_sorting.so.*
100 %_libdir/libgpr*.so.*
101 %_libdir/libgrpc*.so.*
104 %defattr(-,root,root)
108 %_libdir/pkgconfig/*.pc