Accepting request 841058 from home:badshah400:branches:devel:tools
(Fixes for libdir path flagged in sr#838414) - Specify gRPC_INSTALL_LIBDIR and gRPC_INSTALL_CMAKEDIR to correctly configure install paths for libraries and cmake files instead of moving them after the installation. - Add grpc-correct-pkgconfig-path.patch to fix install path for pkgconfig file relative to gRPC_INSTALL_LIBDIR. - Add Requires: pkgconfig(libcares) for the -devel pkg. OBS-URL: https://build.opensuse.org/request/show/841058 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=68
This commit is contained in:
parent
1090425ed4
commit
b249206e2f
13
grpc-correct-pkgconfig-path.patch
Normal file
13
grpc-correct-pkgconfig-path.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: grpc-1.32.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- grpc-1.32.0.orig/CMakeLists.txt
|
||||
+++ grpc-1.32.0/CMakeLists.txt
|
||||
@@ -15667,7 +15667,7 @@ function(generate_pkgconfig name descrip
|
||||
"${output_filepath}"
|
||||
@ONLY)
|
||||
install(FILES "${output_filepath}"
|
||||
- DESTINATION "lib/pkgconfig/")
|
||||
+ DESTINATION "${gRPC_INSTALL_LIBDIR}/pkgconfig/")
|
||||
endfunction()
|
||||
|
||||
# gpr .pc file
|
10
grpc.changes
10
grpc.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 11 16:14:38 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Specify gRPC_INSTALL_LIBDIR and gRPC_INSTALL_CMAKEDIR to
|
||||
correctly configure install paths for libraries and cmake files
|
||||
instead of moving them after the installation.
|
||||
- Add grpc-correct-pkgconfig-path.patch to fix install path for
|
||||
pkgconfig file relative to gRPC_INSTALL_LIBDIR.
|
||||
- Add Requires: pkgconfig(libcares) for the -devel pkg.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 22 16:37:51 UTC 2020 - Michał Rostecki <mrostecki@suse.com>
|
||||
|
||||
|
20
grpc.spec
20
grpc.spec
@ -31,6 +31,8 @@ Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
|
||||
Source2: %name-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM grpc-find-re2-via-pkgconfig.patch gh#grpc/grpc#24088 badshah400@gmail.com -- Attempt to find Re2 library via pkg-config; patch taken from upstream PR
|
||||
Patch0: grpc-find-re2-via-pkgconfig.patch
|
||||
# PATCH-FIX-UPSTREAM grpc-correct-pkgconfig-path.patch badshah400@gmail.com -- Make path for pkgconfig file installation consistent with gRPC_INSTALL_LIBDIR specification
|
||||
Patch1: grpc-correct-pkgconfig-path.patch
|
||||
BuildRequires: abseil-cpp-source
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
@ -98,6 +100,7 @@ Group: Development/Tools/Building
|
||||
Requires: libgrpc%lver = %version
|
||||
Requires: libgrpc++%lverp = %version
|
||||
Requires: libgrpc_plugin_support%lverplugin = %version
|
||||
Requires: pkgconfig(libcares)
|
||||
Requires: pkgconfig(re2)
|
||||
|
||||
%description devel
|
||||
@ -138,12 +141,14 @@ mkdir -p third_party/protobuf/src
|
||||
|
||||
export CFLAGS="%optflags -Wno-error"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
%cmake -DgRPC_INSTALL=ON \
|
||||
-DgRPC_ABSL_PROVIDER=module \
|
||||
-DgRPC_CARES_PROVIDER=package \
|
||||
-DgRPC_PROTOBUF_PROVIDER=package \
|
||||
-DgRPC_RE2_PROVIDER=package \
|
||||
-DgRPC_SSL_PROVIDER=package \
|
||||
%cmake -DgRPC_INSTALL=ON \
|
||||
-DgRPC_INSTALL_LIBDIR:PATH="%_lib" \
|
||||
-DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir"/cmake/grpc \
|
||||
-DgRPC_ABSL_PROVIDER=module \
|
||||
-DgRPC_CARES_PROVIDER=package \
|
||||
-DgRPC_PROTOBUF_PROVIDER=package \
|
||||
-DgRPC_RE2_PROVIDER=package \
|
||||
-DgRPC_SSL_PROVIDER=package \
|
||||
-DgRPC_ZLIB_PROVIDER=package
|
||||
%cmake_build
|
||||
|
||||
@ -155,9 +160,6 @@ ln -s "%buildroot" "b"
|
||||
|
||||
pushd "$b/usr"
|
||||
rm -fv lib/*.a share/grpc/*.pem
|
||||
if test ! -d lib64 && test "%_lib" = lib64; then
|
||||
mv lib lib64
|
||||
fi
|
||||
popd
|
||||
|
||||
# Install sources
|
||||
|
Loading…
Reference in New Issue
Block a user