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-03-28 16:49:33 +02:00
%define lname libgrpc6
2017-04-19 15:05:25 +02:00
Name : grpc
2018-03-28 16:49:33 +02:00
Version : 1.10.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
2017-12-12 01:04:33 +01:00
Patch1 : grpc-build.diff
Patch2 : grpc-versioning.diff
2017-04-19 15:05:25 +02:00
BuildRequires : cmake
BuildRequires : gcc-c++
BuildRequires : pkg-config
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.
%package -n %lname
Summary : HTTP/2-based Remote Procedure Call implementation
Group : System/Libraries
%description -n %lname
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
Requires : %lname = %version
%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of the gRPC reference implementation.
%prep
%setup -q
2017-12-12 01:04:33 +01:00
%patch -P 1 -P 2 -p1
2017-04-19 15:05:25 +02:00
%build
make LIBDIR=x CONFIG=opt \
x/opt/pkgconfig/grpc.pc x/opt/pkgconfig/grpc_unsecure.pc \
x/opt/pkgconfig/grpc++.pc x/opt/pkgconfig/grpc++_unsecure.pc
%cmake \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
2017-12-12 01:04:33 +01:00
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_INSTALL_BINDIR=" %_bindir " \
-DgRPC_INSTALL_INCLUDEDIR=" %_includedir " \
-DgRPC_INSTALL_LIBDIR=" %_libdir "
2017-04-19 15:05:25 +02:00
#[ 36%] Running gRPC C++ protocol buffer compiler on src/proto/grpc/reflection/v1alpha/reflection.proto
#cd /home/abuild/rpmbuild/BUILD/grpc-1.2.3 && /usr/bin/protoc --grpc_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --cpp_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --plugin=protoc-gen-grpc=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/grpc_cpp_plugin -I . src/proto/grpc/reflection/v1alpha/reflection.proto
#/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/grpc_cpp_plugin: error while loading shared libraries: libgrpc_plugin_support.so: cannot open shared object file: No such file or directory
#--grpc_out: protoc-gen-grpc: Plugin failed with status code 127.
export LD_LIBRARY_PATH=" $ P W D "
%make_jobs
%install
b=" % b u i l d r o o t "
mkdir -p " $ b / %_libdir / p k g c o n f i g "
cp x/opt/pkgconfig/*.pc " $ b / %_libdir / p k g c o n f i g / "
%cmake_install
2018-03-28 16:49:33 +02:00
#for i in "$b/%_libdir"/libg*-%version.so; do
# ln -s "${i##*/}" "${i%%-%version.so}.so"
#done
2017-04-19 15:05:25 +02:00
2017-12-12 01:04:33 +01:00
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
2017-04-19 15:05:25 +02:00
2017-12-12 01:04:33 +01:00
%files -n %lname
2017-04-19 15:05:25 +02:00
%defattr (-,root,root)
2018-03-28 16:49:33 +02:00
%_libdir /libg*.so.6
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
%_libdir /libgpr.so
%_libdir /libgrpc++.so
%_libdir /libgrpc++_cronet.so
2017-12-21 13:43:55 +01:00
%_libdir /libgrpc++_error_details.so
2017-04-19 15:05:25 +02:00
%_libdir /libgrpc++_reflection.so
%_libdir /libgrpc++_unsecure.so
%_libdir /libgrpc.so
%_libdir /libgrpc_cronet.so
%_libdir /libgrpc_csharp_ext.so
%_libdir /libgrpc_plugin_support.so
%_libdir /libgrpc_unsecure.so
2017-12-21 13:43:55 +01:00
/usr/lib/cmake
2017-04-19 15:05:25 +02:00
%changelog