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