forked from jengelh/grpc
adjust library versioning to match Makefile
OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=21
This commit is contained in:
parent
013079cc2f
commit
45c7394d0c
@ -1,7 +1,21 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2017-04-19 10:07:43.563879307 +0200
|
||||
|
||||
Unversioned libraries are an ABI nightmare, so work around that in short order.
|
||||
|
||||
The plain Makefile produces these libs:
|
||||
|
||||
/libaddress_sorting.so.6 -> libaddress_sorting.so.6.0.0
|
||||
/libgpr.so.6 -> libgpr.so.6.0.0
|
||||
/libgrpc++.so.1 -> libgrpc++.so.1.12.0
|
||||
/libgrpc++_cronet.so.1 -> libgrpc++_cronet.so.1.12.0
|
||||
/libgrpc++_error_details.so.1 -> libgrpc++_error_details.so.1.12.0
|
||||
/libgrpc++_reflection.so.1 -> libgrpc++_reflection.so.1.12.0
|
||||
/libgrpc++_unsecure.so.1 -> libgrpc++_unsecure.so.1.12.0
|
||||
/libgrpc.so.6 -> libgrpc.so.6.0.0
|
||||
/libgrpc_cronet.so.6 -> libgrpc_cronet.so.6.0.0
|
||||
/libgrpc_unsecure.so.6 -> libgrpc_unsecure.so.6.0.0
|
||||
|
||||
The cmake files leave them unversioned.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 13 +++++++++++++
|
||||
@ -11,12 +25,13 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- grpc-1.10.0.orig/CMakeLists.txt
|
||||
+++ grpc-1.10.0/CMakeLists.txt
|
||||
@@ -29,6 +29,8 @@ set(PACKAGE_STRING "${PACKAGE_NAME} $
|
||||
@@ -29,6 +29,9 @@ set(PACKAGE_STRING "${PACKAGE_NAME} $
|
||||
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
|
||||
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
|
||||
project(${PACKAGE_NAME} C CXX)
|
||||
+# from Makefile:
|
||||
+set(LIBVER 6)
|
||||
+set(XLIBVER 1)
|
||||
|
||||
set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables")
|
||||
set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries")
|
||||
@ -56,7 +71,7 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
src/cpp/util/time_cc.cc
|
||||
src/cpp/codegen/codegen_init.cc
|
||||
)
|
||||
+set_target_properties(grpc++ PROPERTIES VERSION ${LIBVER})
|
||||
+set_target_properties(grpc++ PROPERTIES VERSION ${XLIBVER})
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
set_target_properties(grpc++ PROPERTIES COMPILE_PDB_NAME "grpc++"
|
||||
@ -64,7 +79,7 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
third_party/nanopb/pb_decode.c
|
||||
third_party/nanopb/pb_encode.c
|
||||
)
|
||||
+set_target_properties(grpc++_cronet PROPERTIES VERSION ${LIBVER})
|
||||
+set_target_properties(grpc++_cronet PROPERTIES VERSION ${XLIBVER})
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
set_target_properties(grpc++_cronet PROPERTIES COMPILE_PDB_NAME "grpc++_cronet"
|
||||
@ -72,7 +87,7 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.h
|
||||
src/cpp/util/error_details.cc
|
||||
)
|
||||
+set_target_properties(grpc++_error_details PROPERTIES VERSION ${LIBVER})
|
||||
+set_target_properties(grpc++_error_details PROPERTIES VERSION ${XLIBVER})
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
set_target_properties(grpc++_error_details PROPERTIES COMPILE_PDB_NAME "grpc++_error_details"
|
||||
@ -80,7 +95,7 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h
|
||||
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h
|
||||
)
|
||||
+set_target_properties(grpc++_reflection PROPERTIES VERSION ${LIBVER})
|
||||
+set_target_properties(grpc++_reflection PROPERTIES VERSION ${XLIBVER})
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection"
|
||||
@ -88,7 +103,7 @@ Index: grpc-1.10.0/CMakeLists.txt
|
||||
test/cpp/util/test_credentials_provider.cc
|
||||
src/cpp/codegen/codegen_init.cc
|
||||
)
|
||||
+set_target_properties(grpc++_unsecure PROPERTIES VERSION ${LIBVER})
|
||||
+set_target_properties(grpc++_unsecure PROPERTIES VERSION ${XLIBVER})
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
set_target_properties(grpc++_test_util PROPERTIES COMPILE_PDB_NAME "grpc++_test_util"
|
||||
|
32
grpc.spec
32
grpc.spec
@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%define lname libgrpc6
|
||||
Name: grpc
|
||||
Version: 1.12.0
|
||||
Release: 0
|
||||
@ -42,11 +41,20 @@ 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
|
||||
%package -n libgrpc6
|
||||
Summary: HTTP/2-based Remote Procedure Call implementation
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %lname
|
||||
%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
|
||||
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.
|
||||
@ -54,7 +62,8 @@ 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
|
||||
Requires: libgrpc++1 = %version
|
||||
Requires: libgrpc6 = %version
|
||||
|
||||
%description devel
|
||||
This subpackage contains libraries and header files for developing
|
||||
@ -93,12 +102,19 @@ cp x/opt/pkgconfig/*.pc "$b/%_libdir/pkgconfig/"
|
||||
# ln -s "${i##*/}" "${i%%-%version.so}.so"
|
||||
#done
|
||||
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
%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
|
||||
|
||||
%files -n %lname
|
||||
%files -n libgrpc6
|
||||
%defattr(-,root,root)
|
||||
%_libdir/libg*.so.6
|
||||
%_libdir/libgrpc.so.6*
|
||||
%_libdir/libgrpc_*.so.6*
|
||||
|
||||
%files -n libgrpc++1
|
||||
%defattr(-,root,root)
|
||||
%_libdir/libgrpc++*.so.1
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
Loading…
Reference in New Issue
Block a user