From d0043330213fe52cd51730e519f3707a13667045 Mon Sep 17 00:00:00 2001 From: Jeff Li Date: Mon, 15 May 2017 13:49:00 -0700 Subject: [PATCH] Put lib files into suitable path in RPM package Summary: Currently, the RPM package will install the lib and header files into `/usr/package/lib` and `/usr/package/include` which is not in the default search paths. It is reasonable to install them under `/usr/lib` and `/usr/include` so that no extra configuration is required. Closes https://github.com/facebook/rocksdb/pull/2221 Differential Revision: D5054030 Pulled By: yiwu-arbug fbshipit-source-id: 1d23de5ff21f07e6738c9dfa04429acd7a839143 --- build_tools/make_package.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build_tools/make_package.sh b/build_tools/make_package.sh index 05f1ac050..58bac4473 100755 --- a/build_tools/make_package.sh +++ b/build_tools/make_package.sh @@ -99,6 +99,18 @@ function main() { make static_lib make install INSTALL_PATH=package + + cd package + + LIB_DIR=lib + if [[ -z "$ARCH" ]]; then + ARCH=$(getconf LONG_BIT) + fi + if [[ ("$FPM_OUTPUT" = "rpm") && ($ARCH -eq 64) ]]; then + mv lib lib64 + LIB_DIR=lib64 + fi + fpm \ -s dir \ -t $FPM_OUTPUT \ @@ -110,7 +122,7 @@ function main() { --license BSD \ --vendor Facebook \ --description "RocksDB is an embeddable persistent key-value store for fast storage." \ - package + include $LIB_DIR } main $@