SHA256
1
0
forked from jengelh/grpc

- Switch to plain makefiles since they generate more shared libs.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=22
This commit is contained in:
Jan Engelhardt 2018-05-18 14:55:41 +00:00 committed by Git OBS Bridge
parent 45c7394d0c
commit f234d16caf
2 changed files with 28 additions and 61 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 18 14:55:27 UTC 2018 - jengelh@inai.de
- Switch to plain makefiles since they generate more shared libs.
-------------------------------------------------------------------
Fri May 18 13:26:45 UTC 2018 - tbechtold@suse.com

View File

@ -16,6 +16,7 @@
#
%define lname libgrpc6
Name: grpc
Version: 1.12.0
Release: 0
@ -41,20 +42,11 @@ 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 libgrpc6
%package -n %lname
Summary: HTTP/2-based Remote Procedure Call implementation
Group: System/Libraries
%description -n libgrpc6
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 libgrpc++1
Summary: C++ interface to grpc, a HTTP/2-based Remote Procedure Call implementation
Group: System/Libraries
%description -n libgrpc++1
%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.
@ -62,8 +54,7 @@ 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: libgrpc++1 = %version
Requires: libgrpc6 = %version
Requires: %lname = %version
%description devel
This subpackage contains libraries and header files for developing
@ -74,47 +65,29 @@ applications that want to make use of the gRPC reference implementation.
%patch -P 1 -P 2 -p1
%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 \
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_INSTALL_BINDIR="%_bindir" \
-DgRPC_INSTALL_INCLUDEDIR="%_includedir" \
-DgRPC_INSTALL_LIBDIR="%_libdir"
#[ 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="$PWD"
%make_jobs
%make_jobs STRIP=/bin/true V=1 VERBOSE=1 CFLAGS="%optflags" CXXFLAGS="%optflags"
%install
b="%buildroot"
mkdir -p "$b/%_libdir/pkgconfig"
cp x/opt/pkgconfig/*.pc "$b/%_libdir/pkgconfig/"
%cmake_install
#for i in "$b/%_libdir"/libg*-%version.so; do
# ln -s "${i##*/}" "${i%%-%version.so}.so"
#done
%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 -f lib/*.a
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 libgrpc6 -p /sbin/ldconfig
%postun -n libgrpc6 -p /sbin/ldconfig
%post -n libgrpc++1 -p /sbin/ldconfig
%postun -n libgrpc++1 -p /sbin/ldconfig
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n libgrpc6
%files -n %lname
%defattr(-,root,root)
%_libdir/libgrpc.so.6*
%_libdir/libgrpc_*.so.6*
%files -n libgrpc++1
%defattr(-,root,root)
%_libdir/libgrpc++*.so.1
%_libdir/libaddress_sorting.so.*
%_libdir/libgpr*.so.*
%_libdir/libgrpc*.so.*
%files devel
%defattr(-,root,root)
@ -122,18 +95,7 @@ cp x/opt/pkgconfig/*.pc "$b/%_libdir/pkgconfig/"
%_bindir/*
%_includedir/*
%_libdir/pkgconfig/*.pc
%_libdir/libaddress_sorting.so
%_libdir/libgpr.so
%_libdir/libgrpc++.so
%_libdir/libgrpc++_cronet.so
%_libdir/libgrpc++_error_details.so
%_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
/usr/lib/cmake
%_libdir/*.so
%_datadir/grpc/
%changelog