2017-04-19 15:05:25 +02:00
|
|
|
#
|
|
|
|
# spec file for package grpc
|
|
|
|
#
|
2018-01-02 14:44:07 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-04-19 15:05:25 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-05-28 19:36:25 +02:00
|
|
|
%define lname libgrpc6
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-04-19 15:05:25 +02:00
|
|
|
Name: grpc
|
2018-05-18 15:34:36 +02:00
|
|
|
Version: 1.12.0
|
2017-04-19 15:05:25 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
2017-12-12 01:04:33 +01:00
|
|
|
License: Apache-2.0
|
2017-04-19 15:05:25 +02:00
|
|
|
Group: Development/Tools/Building
|
|
|
|
Url: http://grpc.io/
|
|
|
|
Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
|
2018-05-28 19:36:25 +02:00
|
|
|
# # PATCH-FEATURE-UPSTREAM 0001-Allow-building-the-python-module-with-system-openssl.patch -- https://github.com/grpc/grpc/pull/15548
|
|
|
|
Patch0: 0001-Allow-building-the-python-module-with-system-openssl.patch
|
|
|
|
# # PATCH-FEATURE-UPSTREAM 0002-Allow-building-the-python-module-with-system-zlib.patch -- https://github.com/grpc/grpc/pull/15548
|
|
|
|
Patch1: 0002-Allow-building-the-python-module-with-system-zlib.patch
|
|
|
|
# # PATCH-FEATURE-UPSTREAM 0003-Allow-building-the-python-module-with-system-cares.patch -- https://github.com/grpc/grpc/pull/15548
|
|
|
|
Patch2: 0003-Allow-building-the-python-module-with-system-cares.patch
|
|
|
|
BuildRequires: %{python_module Cython}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: pkg-config
|
2018-05-28 19:36:25 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-12-12 01:04:33 +01:00
|
|
|
BuildRequires: pkgconfig(libcares)
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: pkgconfig(openssl) >= 1.0.1
|
2017-12-12 01:04:33 +01:00
|
|
|
BuildRequires: pkgconfig(protobuf) >= 3.5
|
2017-04-19 15:05:25 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The reference implementation of the gRPC protocol, done on top of
|
|
|
|
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
|
|
|
|
Protocol Buffers as the Interface Definition Language by default.
|
|
|
|
|
2018-05-18 16:55:41 +02:00
|
|
|
%package -n %lname
|
2017-04-19 15:05:25 +02:00
|
|
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2018-05-18 16:55:41 +02:00
|
|
|
%description -n %lname
|
2017-04-19 15:05:25 +02:00
|
|
|
The reference implementation of the gRPC protocol, done on top of
|
|
|
|
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
|
|
|
|
Protocol Buffers as the Interface Definition Language by default.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
|
|
|
|
Group: Development/Tools/Building
|
2018-05-18 16:55:41 +02:00
|
|
|
Requires: %lname = %version
|
2017-04-19 15:05:25 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This subpackage contains libraries and header files for developing
|
|
|
|
applications that want to make use of the gRPC reference implementation.
|
|
|
|
|
2018-05-28 19:36:25 +02:00
|
|
|
%package -n python2-grpcio
|
|
|
|
Summary: Python language bindings for grpc, a HTTP/2 Remote Procedure Call implementation
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{lname} = %{version}-%{release}
|
|
|
|
Requires: python = %{python2_version}
|
|
|
|
|
|
|
|
%description -n python2-grpcio
|
|
|
|
This subpackage contains the python2 bindings.
|
|
|
|
|
|
|
|
%package -n python3-grpcio
|
|
|
|
Summary: Python language bindings for grpc, a HTTP/2 Remote Procedure Call implementation
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{lname} = %{version}-%{release}
|
|
|
|
Requires: python = %{python3_version}
|
|
|
|
|
|
|
|
%description -n python3-grpcio
|
|
|
|
This subpackage contains the python3 bindings.
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2018-05-28 19:36:25 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2018-05-18 15:34:36 +02:00
|
|
|
%build
|
2018-05-18 17:11:37 +02:00
|
|
|
make %{?_smp_mflags} STRIP=/bin/true V=1 VERBOSE=1 CFLAGS="%optflags" CXXFLAGS="%optflags"
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2018-05-28 19:36:25 +02:00
|
|
|
# build python module
|
|
|
|
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}"
|
|
|
|
%python_build
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%install
|
|
|
|
b="%buildroot"
|
2018-05-18 16:55:41 +02:00
|
|
|
%make_install prefix="$b/%_prefix" STRIP=/bin/true V=1 VERBOSE=1
|
|
|
|
find "$b/%_includedir" -type f -exec chmod a-x {} +
|
|
|
|
pushd "$b/usr"
|
2018-05-18 17:11:37 +02:00
|
|
|
rm -fv lib/*.a share/grpc/*.pem
|
2018-05-18 16:55:41 +02:00
|
|
|
perl -i -pe 's{^prefix=.*}{prefix=%_prefix}' lib/pkgconfig/*.pc
|
|
|
|
perl -i -pe 's{^libdir=.*}{libdir=%_libdir}' lib/pkgconfig/*.pc
|
|
|
|
if test ! -d lib64 && test "%_lib" = lib64; then
|
|
|
|
mv lib lib64
|
|
|
|
fi
|
|
|
|
popd
|
2018-05-28 19:36:25 +02:00
|
|
|
%python_install
|
2018-05-18 16:55:41 +02:00
|
|
|
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %lname
|
2017-04-19 15:05:25 +02:00
|
|
|
%defattr(-,root,root)
|
2018-05-18 16:55:41 +02:00
|
|
|
%_libdir/libaddress_sorting.so.*
|
|
|
|
%_libdir/libgpr*.so.*
|
|
|
|
%_libdir/libgrpc*.so.*
|
2017-04-19 15:05:25 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2018-03-28 16:49:33 +02:00
|
|
|
%license LICENSE
|
2017-04-19 15:05:25 +02:00
|
|
|
%_bindir/*
|
|
|
|
%_includedir/*
|
|
|
|
%_libdir/pkgconfig/*.pc
|
2018-05-18 16:55:41 +02:00
|
|
|
%_libdir/*.so
|
2017-04-19 15:05:25 +02:00
|
|
|
|
2018-05-28 19:36:25 +02:00
|
|
|
%files -n python2-grpcio
|
|
|
|
%{python2_sitearch}/grpcio-%{version}-py*.egg-info
|
|
|
|
%{python2_sitearch}/grpc
|
|
|
|
|
|
|
|
%files -n python3-grpcio
|
|
|
|
%{python3_sitearch}/grpcio-%{version}-py*.egg-info
|
|
|
|
%{python3_sitearch}/grpc
|
|
|
|
|
2017-04-19 15:05:25 +02:00
|
|
|
%changelog
|