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
This commit is contained in:
Jeff Li 2017-05-15 13:49:00 -07:00 committed by Facebook Github Bot
parent 86d5492530
commit d004333021

View File

@ -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 $@