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