]> git.pld-linux.org Git - packages/grpc.git/blame - grpc.spec
Release 2 (by relup.sh)
[packages/grpc.git] / grpc.spec
CommitLineData
f872612c
JB
1# TODO:
2# - system address_sorting and upb?
3# - use shared grpc core in python modules
4#
5# Conditional build:
6%bcond_without apidocs # (Python) API docs build
f872612c
JB
7%bcond_without python3 # CPython 3.x module
8#
9Summary: RPC library and framework
10Summary(pl.UTF-8): Biblioteka i szkielet RPC
11Name: grpc
a1ffe626 12Version: 1.43.0
26aca7eb 13Release: 2
f872612c
JB
14License: Apache v2.0
15Group: Libraries
16#Source0Download: https://github.com/grpc/grpc/releases
17Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz
a1ffe626 18# Source0-md5: 92559743e7b5d3f67486c4c0de2f5cbe
f872612c
JB
19Patch0: %{name}-system-absl.patch
20Patch1: %{name}-sphinx.patch
321e5c15
JB
21Patch2: %{name}-x32.patch
22Patch3: %{name}-libdir.patch
c3c2ad9f 23Patch5: %{name}-system-openssl.patch
f872612c
JB
24URL: https://grpc.io/
25BuildRequires: abseil-cpp-devel
26BuildRequires: c-ares-devel >= 1.13.0
27BuildRequires: cmake >= 3.5.1
28BuildRequires: libstdc++-devel >= 6:4.7
29BuildRequires: openssl-devel
321e5c15 30BuildRequires: protobuf-devel >= 3.12
483a19e0
JB
31# with re2Config for cmake
32BuildRequires: re2-devel >= 20200801
f872612c
JB
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35BuildRequires: zlib-devel
f872612c 36%if %{with python3}
a1ffe626 37BuildRequires: python3-Cython >= 0.29.8
f872612c
JB
38BuildRequires: python3-modules >= 1:3.5
39%endif
40%if %{with apidocs}
41BuildRequires: python3-Sphinx >= 1.8.1
42BuildRequires: python3-six >= 1.10
43%endif
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46# require non-function grpc_core::ExecCtx::exec_ctx_ and grpc_core::ApplicationCallbackExecCtx::callback_exec_ctx_ symbols
47%define skip_post_check_so libgrpc\\+\\+.so.* libgrpc\\+\\+_unsecure.so.*
48
49%description
50gRPC is a modern, open source, high-performance remote procedure call
51(RPC) framework that can run anywhere. gRPC enables client and server
52applications to communicate transparently, and simplifies the building
53of connected systems.
54
55%description -l pl.UTF-8
56gRPC to nowoczesny, mający otwarty źródła, wydajny szkielet zdalnych
57wywołań procedur (RPC - Remote Procedure Call). Pozwala na
58przezroczystą komunikację klienta i serwera, upraszcza tworzenie
59systemów połączonych.
60
61%package devel
62Summary: Header files for gRPC library
63Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gRPC
64Group: Development/Libraries
65Requires: %{name} = %{version}-%{release}
66
67%description devel
68Header files for gRPC library.
69
70%description devel -l pl.UTF-8
71Pliki nagłówkowe biblioteki gRPC.
72
73%package apidocs
74Summary: API documentation for gRPC library
75Summary(pl.UTF-8): Dokumentacja API biblioteki gRPC
76Group: Documentation
f872612c 77BuildArch: noarch
f872612c
JB
78
79%description apidocs
80API documentation for gRPC library.
81
82%description apidocs -l pl.UTF-8
83Dokumentacja API biblioteki gRPC.
84
f872612c
JB
85%package -n python3-grpcio
86Summary: HTTP/2 based RPC framework
87Summary(pl.UTF-8): Szkielet RPC oparty na HTTP/2
88Group: Libraries/Python
89
90%description -n python3-grpcio
91gRPC is a modern, open source, high-performance remote procedure call
92(RPC) framework that can run anywhere. gRPC enables client and server
93applications to communicate transparently, and simplifies the building
94of connected systems.
95
96%description -n python3-grpcio -l pl.UTF-8
97gRPC to nowoczesny, mający otwarty źródła, wydajny szkielet zdalnych
98wywołań procedur (RPC - Remote Procedure Call). Pozwala na
99przezroczystą komunikację klienta i serwera, upraszcza tworzenie
100systemów połączonych.
101
53fc12f4 102%package -n python3-grpcio-apidocs
f872612c
JB
103Summary: API documentation for Python gRPC library
104Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona gRPC
105Group: Documentation
f872612c 106BuildArch: noarch
f872612c 107
53fc12f4 108%description -n python3-grpcio-apidocs
f872612c
JB
109API documentation for Python gRPC library.
110
53fc12f4 111%description -n python3-grpcio-apidocs -l pl.UTF-8
f872612c
JB
112Dokumentacja API biblioteki Pythona gRPC.
113
114%prep
115%setup -q
116%patch0 -p1
117%patch1 -p1
321e5c15
JB
118%patch2 -p1
119%patch3 -p1
c3c2ad9f 120%patch5 -p1
f872612c
JB
121
122%build
123install -d build
124cd build
125%cmake .. \
53fc12f4 126 -DCMAKE_CXX_STANDARD=17 \
f872612c
JB
127 -DgRPC_INSTALL_CMAKEDIR:PATH=%{_lib}/cmake/grpc \
128 -DgRPC_INSTALL_LIBDIR:PATH=%{_lib} \
129 -DgRPC_ABSL_PROVIDER=package \
130 -DgRPC_CARES_PROVIDER=package \
131 -DgRPC_PROTOBUF_PROVIDER=package \
d528a95f 132 -DgRPC_RE2_PROVIDER=package \
f872612c
JB
133 -DgRPC_SSL_PROVIDER=package \
134 -DgRPC_ZLIB_PROVIDER=package
135
136%{__make}
137cd ..
138
139export GRPC_PYTHON_BUILD_SYSTEM_ABSL=1
140export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
141export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
d528a95f 142export GRPC_PYTHON_BUILD_SYSTEM_RE2=1
f872612c
JB
143export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
144
f872612c
JB
145%if %{with python3}
146%if %{with apidocs}
147export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD=1
148%endif
149%py3_build
150%endif
151
152%if %{with apidocs}
153sphinx-build-3 -b html doc/python/sphinx doc/python/sphinx/_build/html
154%endif
155
156%install
157rm -rf $RPM_BUILD_ROOT
158
159%{__make} -C build install \
160 DESTDIR=$RPM_BUILD_ROOT
161
162export GRPC_PYTHON_BUILD_SYSTEM_ABSL=1
163export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
164export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
d528a95f 165export GRPC_PYTHON_BUILD_SYSTEM_RE2=1
f872612c
JB
166export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
167
f872612c
JB
168%if %{with python3}
169%py3_install
170%endif
171
172install -d $RPM_BUILD_ROOT%{_docdir}
173cp -pr doc $RPM_BUILD_ROOT%{_docdir}/%{name}-apidocs-%{version}
174%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-apidocs-%{version}/{csharp,python/sphinx,.gitignore}
175
176%clean
177rm -rf $RPM_BUILD_ROOT
178
179%post -p /sbin/ldconfig
180%postun -p /sbin/ldconfig
181
182%files
183%defattr(644,root,root,755)
184%doc AUTHORS CONCEPTS.md MAINTAINERS.md NOTICE.txt README.md TROUBLESHOOTING.md
185%attr(755,root,root) %{_bindir}/grpc_cpp_plugin
186%attr(755,root,root) %{_bindir}/grpc_csharp_plugin
187%attr(755,root,root) %{_bindir}/grpc_node_plugin
188%attr(755,root,root) %{_bindir}/grpc_objective_c_plugin
189%attr(755,root,root) %{_bindir}/grpc_php_plugin
190%attr(755,root,root) %{_bindir}/grpc_python_plugin
191%attr(755,root,root) %{_bindir}/grpc_ruby_plugin
192%attr(755,root,root) %{_libdir}/libgpr.so.*.*.*
a1ffe626 193%attr(755,root,root) %ghost %{_libdir}/libgpr.so.21
f872612c 194%attr(755,root,root) %{_libdir}/libgrpc.so.*.*.*
a1ffe626 195%attr(755,root,root) %ghost %{_libdir}/libgrpc.so.21
f872612c 196%attr(755,root,root) %{_libdir}/libgrpc_plugin_support.so.*.*.*
a1ffe626 197%attr(755,root,root) %ghost %{_libdir}/libgrpc_plugin_support.so.1.43
f872612c 198%attr(755,root,root) %{_libdir}/libgrpc_unsecure.so.*.*.*
a1ffe626 199%attr(755,root,root) %ghost %{_libdir}/libgrpc_unsecure.so.21
f872612c 200%attr(755,root,root) %{_libdir}/libgrpc++.so.*.*.*
a1ffe626 201%attr(755,root,root) %ghost %{_libdir}/libgrpc++.so.1.43
f872612c 202%attr(755,root,root) %{_libdir}/libgrpc++_alts.so.*.*.*
a1ffe626 203%attr(755,root,root) %ghost %{_libdir}/libgrpc++_alts.so.1.43
f872612c 204%attr(755,root,root) %{_libdir}/libgrpc++_error_details.so.*.*.*
a1ffe626 205%attr(755,root,root) %ghost %{_libdir}/libgrpc++_error_details.so.1.43
f872612c 206%attr(755,root,root) %{_libdir}/libgrpc++_reflection.so.*.*.*
a1ffe626 207%attr(755,root,root) %ghost %{_libdir}/libgrpc++_reflection.so.1.43
f872612c 208%attr(755,root,root) %{_libdir}/libgrpc++_unsecure.so.*.*.*
a1ffe626 209%attr(755,root,root) %ghost %{_libdir}/libgrpc++_unsecure.so.1.43
f872612c 210%attr(755,root,root) %{_libdir}/libgrpcpp_channelz.so.*.*.*
a1ffe626 211%attr(755,root,root) %ghost %{_libdir}/libgrpcpp_channelz.so.1.43
f872612c
JB
212# TODO: use system libs instead
213%attr(755,root,root) %{_libdir}/libaddress_sorting.so.*.*.*
a1ffe626 214%attr(755,root,root) %ghost %{_libdir}/libaddress_sorting.so.21
f872612c 215%attr(755,root,root) %{_libdir}/libupb.so.*.*.*
a1ffe626 216%attr(755,root,root) %ghost %{_libdir}/libupb.so.21
f872612c
JB
217%{_datadir}/grpc
218
219%files devel
220%defattr(644,root,root,755)
221%attr(755,root,root) %{_libdir}/libgpr.so
222%attr(755,root,root) %{_libdir}/libgrpc.so
223%attr(755,root,root) %{_libdir}/libgrpc_plugin_support.so
224%attr(755,root,root) %{_libdir}/libgrpc_unsecure.so
225%attr(755,root,root) %{_libdir}/libgrpc++.so
226%attr(755,root,root) %{_libdir}/libgrpc++_alts.so
227%attr(755,root,root) %{_libdir}/libgrpc++_error_details.so
228%attr(755,root,root) %{_libdir}/libgrpc++_reflection.so
229%attr(755,root,root) %{_libdir}/libgrpc++_unsecure.so
230%attr(755,root,root) %{_libdir}/libgrpcpp_channelz.so
231%attr(755,root,root) %{_libdir}/libaddress_sorting.so
232%attr(755,root,root) %{_libdir}/libupb.so
233%{_includedir}/grpc
234%{_includedir}/grpc++
235%{_includedir}/grpcpp
236%{_libdir}/cmake/grpc
237%{_pkgconfigdir}/gpr.pc
238%{_pkgconfigdir}/grpc.pc
239%{_pkgconfigdir}/grpc_unsecure.pc
240%{_pkgconfigdir}/grpc++.pc
241%{_pkgconfigdir}/grpc++_unsecure.pc
242
243%files apidocs
244%defattr(644,root,root,755)
245%{_docdir}/%{name}-apidocs-%{version}
246
f872612c
JB
247%if %{with python3}
248%files -n python3-grpcio
249%defattr(644,root,root,755)
250%dir %{py3_sitedir}/grpc
251%{py3_sitedir}/grpc/*.py
252%{py3_sitedir}/grpc/__pycache__
253%dir %{py3_sitedir}/grpc/_cython
254%attr(755,root,root) %{py3_sitedir}/grpc/_cython/cygrpc.cpython-*.so
255%{py3_sitedir}/grpc/_cython/__init__.py
256%{py3_sitedir}/grpc/_cython/__pycache__
257%{py3_sitedir}/grpc/_cython/_credentials
258%{py3_sitedir}/grpc/_cython/_cygrpc
d528a95f 259%{py3_sitedir}/grpc/aio
f872612c
JB
260%{py3_sitedir}/grpc/beta
261%{py3_sitedir}/grpc/experimental
262%{py3_sitedir}/grpc/framework
263%{py3_sitedir}/grpcio-%{version}-py*.egg-info
264%endif
265
266%if %{with apidocs}
53fc12f4 267%files -n python3-grpcio-apidocs
f872612c
JB
268%defattr(644,root,root,755)
269%doc doc/python/sphinx/_build/html/{_static,*.html,*.js}
270%endif
This page took 0.055684 seconds and 4 git commands to generate.