forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use standard variables for installing/uninstalling with make (faceboo…
…k#7187) Summary: Fixes facebook#7185. Standard for GNU and FreeBSD. See https://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html https://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR https://www.gnu.org/prep/standards/html_node/Directory-Variables.html Pull Request resolved: facebook#7187 Reviewed By: cheng-chang Differential Revision: D23333233 Pulled By: ajkr fbshipit-source-id: f704d23852c4516cf5fa00df73ff57687b2ddffb
- Loading branch information
1 parent
c2485f2
commit 1e59800
Showing
2 changed files
with
32 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,31 +103,26 @@ function main() { | |
gem_install fpm | ||
|
||
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 | ||
LIBDIR=/usr/lib | ||
if [[ $FPM_OUTPUT = "rpm" ]]; then | ||
LIBDIR=$(rpm --eval '%_libdir') | ||
fi | ||
|
||
rm -rf package | ||
make install DESTDIR=package PREFIX=/usr LIBDIR=$LIBDIR | ||
|
||
fpm \ | ||
-s dir \ | ||
-t $FPM_OUTPUT \ | ||
-C package \ | ||
-n rocksdb \ | ||
-v $1 \ | ||
--prefix /usr \ | ||
--url http://rocksdb.org/ \ | ||
-m [email protected] \ | ||
--license BSD \ | ||
--vendor Facebook \ | ||
--description "RocksDB is an embeddable persistent key-value store for fast storage." \ | ||
include $LIB_DIR | ||
usr | ||
} | ||
|
||
# shellcheck disable=SC2068 | ||
|