diff --git a/grpc-correct-pkgconfig-path.patch b/grpc-correct-pkgconfig-path.patch new file mode 100644 index 0000000..760a8a1 --- /dev/null +++ b/grpc-correct-pkgconfig-path.patch @@ -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 diff --git a/grpc.changes b/grpc.changes index 4b88e72..36f63cd 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Oct 11 16:14:38 UTC 2020 - Atri Bhattacharya + +- 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 diff --git a/grpc.spec b/grpc.spec index 51bf0fe..e1ee078 100644 --- a/grpc.spec +++ b/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