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>
|
From: Jan Engelhardt <jengelh@inai.de>
|
||||||
Date: 2017-04-19 10:07:43.563879307 +0200
|
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 +++++++++++++
|
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.orig/CMakeLists.txt
|
||||||
+++ grpc-1.10.0/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_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
|
||||||
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
|
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
|
||||||
project(${PACKAGE_NAME} C CXX)
|
project(${PACKAGE_NAME} C CXX)
|
||||||
+# from Makefile:
|
+# from Makefile:
|
||||||
+set(LIBVER 6)
|
+set(LIBVER 6)
|
||||||
|
+set(XLIBVER 1)
|
||||||
|
|
||||||
set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables")
|
set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables")
|
||||||
set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries")
|
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/util/time_cc.cc
|
||||||
src/cpp/codegen/codegen_init.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)
|
if(WIN32 AND MSVC)
|
||||||
set_target_properties(grpc++ PROPERTIES COMPILE_PDB_NAME "grpc++"
|
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_decode.c
|
||||||
third_party/nanopb/pb_encode.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)
|
if(WIN32 AND MSVC)
|
||||||
set_target_properties(grpc++_cronet PROPERTIES COMPILE_PDB_NAME "grpc++_cronet"
|
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
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.h
|
||||||
src/cpp/util/error_details.cc
|
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)
|
if(WIN32 AND MSVC)
|
||||||
set_target_properties(grpc++_error_details PROPERTIES COMPILE_PDB_NAME "grpc++_error_details"
|
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.pb.h
|
||||||
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.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)
|
if(WIN32 AND MSVC)
|
||||||
set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection"
|
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
|
test/cpp/util/test_credentials_provider.cc
|
||||||
src/cpp/codegen/codegen_init.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)
|
if(WIN32 AND MSVC)
|
||||||
set_target_properties(grpc++_test_util PROPERTIES COMPILE_PDB_NAME "grpc++_test_util"
|
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
|
Name: grpc
|
||||||
Version: 1.12.0
|
Version: 1.12.0
|
||||||
Release: 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
|
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
|
||||||
Protocol Buffers as the Interface Definition Language by default.
|
Protocol Buffers as the Interface Definition Language by default.
|
||||||
|
|
||||||
%package -n %lname
|
%package -n libgrpc6
|
||||||
Summary: HTTP/2-based Remote Procedure Call implementation
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
||||||
Group: System/Libraries
|
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
|
The reference implementation of the gRPC protocol, done on top of
|
||||||
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
|
HTTP/2 with support for synchronous and asynchronous calls. gRPC uses
|
||||||
Protocol Buffers as the Interface Definition Language by default.
|
Protocol Buffers as the Interface Definition Language by default.
|
||||||
@ -54,7 +62,8 @@ Protocol Buffers as the Interface Definition Language by default.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
|
Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation
|
||||||
Group: Development/Tools/Building
|
Group: Development/Tools/Building
|
||||||
Requires: %lname = %version
|
Requires: libgrpc++1 = %version
|
||||||
|
Requires: libgrpc6 = %version
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This subpackage contains libraries and header files for developing
|
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"
|
# ln -s "${i##*/}" "${i%%-%version.so}.so"
|
||||||
#done
|
#done
|
||||||
|
|
||||||
%post -n %lname -p /sbin/ldconfig
|
%post -n libgrpc6 -p /sbin/ldconfig
|
||||||
%postun -n %lname -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)
|
%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
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user