# # spec file for package grpc # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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/ # %define lname libgrpc6 Name: grpc Version: 1.12.0 Release: 0 Summary: HTTP/2-based Remote Procedure Call implementation License: Apache-2.0 Group: Development/Tools/Building Url: http://grpc.io/ Source: https://github.com/grpc/grpc/archive/v%version.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(openssl) >= 1.0.1 BuildRequires: pkgconfig(protobuf) >= 3.5 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 %build make %{?_smp_mflags} STRIP=/bin/true V=1 VERBOSE=1 CFLAGS="%optflags" CXXFLAGS="%optflags" %install b="%buildroot" %make_install prefix="$b/%_prefix" STRIP=/bin/true V=1 VERBOSE=1 find "$b/%_includedir" -type f -exec chmod a-x {} + pushd "$b/usr" rm -fv lib/*.a share/grpc/*.pem 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 %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files -n %lname %defattr(-,root,root) %_libdir/libaddress_sorting.so.* %_libdir/libgpr*.so.* %_libdir/libgrpc*.so.* %files devel %defattr(-,root,root) %license LICENSE %_bindir/* %_includedir/* %_libdir/pkgconfig/*.pc %_libdir/*.so %changelog