grpc/grpc.spec

107 lines
3.2 KiB
RPMSpec
Raw Normal View History

2019-12-25 18:06:46 +08:00
Name: grpc
2020-06-09 15:42:57 +08:00
Version: 1.28.1
Release: 1
2019-12-25 18:06:46 +08:00
Summary: A modern, open source high performance RPC framework that can run in any environment
License: ASL 2.0
URL: https://www.grpc.io
Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz
2020-06-09 15:42:57 +08:00
Source1: abseil-cpp-b832dce8489ef7b6231384909fd9b68d5a5ff2b7.tar.gz
2019-12-25 18:06:46 +08:00
Patch9000: 0001-cxx-Arg-List-Too-Long.patch
Patch9001: 0002-add-secure-compile-option-in-Makefile.patch
2020-03-20 11:44:40 +08:00
BuildRequires: gcc-c++ pkgconfig protobuf-devel protobuf-compiler gdb
2019-12-25 18:06:46 +08:00
BuildRequires: openssl-devel c-ares-devel gflags-devel gtest-devel zlib-devel gperftools-devel
BuildRequires: python3-devel python3-setuptools python3-Cython
Requires: protobuf-compiler
Provides: %{name}-plugins = %{version}-%{release}
Provides: %{name}-cli = %{version}-%{release}
Obsoletes: %{name}-plugins < %{version}-%{release}
Obsoletes: %{name}-cli < %{version}-%{release}
2019-09-30 10:51:59 -04:00
%description
gRPC is a modern open source high performance RPC framework that can run in any environment.
It can efficiently connect services in and across data centers with pluggable support for
load balancing, tracing, health checking and authentication. It is also applicable in last
mile of distributed computing to connect devices, mobile applications and browsers to backend services.
2019-12-25 18:06:46 +08:00
%package devel
Summary: gRPC library development files
Requires: %{name} = %{version}-%{release}
2019-09-30 10:51:59 -04:00
2019-12-25 18:06:46 +08:00
%description devel
2019-09-30 10:51:59 -04:00
Development headers and files for gRPC libraries.
%package -n python3-grpcio
2019-12-25 18:06:46 +08:00
Summary: Python3 language bindings for gRPC
Requires: %{name} = %{version}-%{release}
2019-09-30 10:51:59 -04:00
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-grpcio
Python3 bindings for gRPC.
%prep
%autosetup -p1
2019-12-25 18:06:46 +08:00
sed -i 's:^prefix ?= .*:prefix ?= %{_prefix}:' Makefile
sed -i 's:$(prefix)/lib:$(prefix)/%{_lib}:' Makefile
sed -i 's:^GTEST_LIB =.*::' Makefile
2020-06-09 15:42:57 +08:00
tar -zxf %{SOURCE1} --strip-components 1 -C %{_builddir}/%{name}-%{version}/third_party/abseil-cpp/
2019-09-30 10:51:59 -04:00
%build
%make_build shared plugins
2019-12-25 18:06:46 +08:00
# build python module
2019-09-30 10:51:59 -04:00
export GRPC_PYTHON_BUILD_WITH_CYTHON=True
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
export CFLAGS="%optflags"
%py3_build
%install
2019-12-25 18:06:46 +08:00
make install prefix="%{buildroot}%{_prefix}"
2019-09-30 10:51:59 -04:00
make install-grpc-cli prefix="%{buildroot}%{_prefix}"
%delete_la_and_a
%py3_install
2019-12-25 18:06:46 +08:00
%ldconfig_scriptlets
2019-09-30 10:51:59 -04:00
%files
2019-12-25 18:06:46 +08:00
%defattr(-,root,root)
2019-09-30 10:51:59 -04:00
%doc README.md
%license LICENSE
2019-12-25 18:06:46 +08:00
%{_bindir}/grpc_cli
2019-09-30 10:51:59 -04:00
%{_bindir}/grpc_*_plugin
2019-12-25 18:06:46 +08:00
%{_libdir}/*.so.1*
2020-06-09 15:42:57 +08:00
%{_libdir}/*.so.9*
2019-12-25 18:06:46 +08:00
%{_datadir}/grpc
2019-09-30 10:51:59 -04:00
%files devel
2019-12-25 18:06:46 +08:00
%defattr(-,root,root)
2019-09-30 10:51:59 -04:00
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/grpc
%{_includedir}/grpc++
%{_includedir}/grpcpp
%files -n python3-grpcio
2019-12-25 18:06:46 +08:00
%defattr(-,root,root)
2019-09-30 10:51:59 -04:00
%{python3_sitearch}/grpc
%{python3_sitearch}/grpcio-%{version}-py?.?.egg-info
%changelog
2020-06-09 15:42:57 +08:00
* Tue Jun 9 2020 zhujunhao <zhujunhao8@huawei.com> - 1.28.1-1
- upadate to 1.28.1
2020-03-20 11:44:40 +08:00
* Fri Mar 20 2020 songnannan <songnannan2@huawei.com> - 1.22.0-3
2020-06-09 15:42:57 +08:00
- add gdb in buildrequires
2020-03-20 11:44:40 +08:00
2020-01-11 16:45:03 +08:00
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.22.0-2
- Delete unused patch
2019-12-25 18:06:46 +08:00
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.22.0-1
2019-09-30 10:51:59 -04:00
- Package init