]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/build_tools/make_package.sh
16 if [[ -f "/etc/yum.conf" ]]; then
17 eval $__resultvar="centos"
18 elif [[ -f "/etc/dpkg/dpkg.cfg" ]]; then
19 eval $__resultvar="ubuntu"
21 fatal
"Unknwon operating system"
27 if [[ $OS = "ubuntu" ]]; then
28 if dpkg
--get-selections |
grep --quiet $1; then
29 log
"$1 is already installed. skipping."
33 elif [[ $OS = "centos" ]]; then
34 if rpm
-qa |
grep --quiet $1; then
35 log
"$1 is already installed. skipping."
42 function detect_fpm_output
() {
43 if [[ $OS = "ubuntu" ]]; then
45 elif [[ $OS = "centos" ]]; then
51 function gem_install
() {
52 if gem list |
grep --quiet $1; then
53 log
"$1 is already installed. skipping."
60 if [[ $# -ne 1 ]]; then
61 fatal
"Usage: $0 <rocksdb_version>"
63 log
"using rocksdb version: $1"
66 if [[ -d /vagrant
]]; then
67 if [[ $OS = "ubuntu" ]]; then
71 # the deb would depend on libgflags2, but the static lib is the only thing
72 # installed by make install
76 elif [[ $OS = "centos" ]]; then
77 pushd /etc
/yum.repos.d
78 if [[ ! -f /etc
/yum.repos.d
/devtools-1.1.repo
]]; then
79 wget http
://people.centos.org
/tru
/devtools-1.1
/devtools-1.1.repo
81 package devtoolset-1.1
-gcc --enablerepo=testing-1.1
-devtools-6
82 package devtoolset-1.1
-gcc-c++ --enablerepo=testing-1.1
-devtools-6
83 export CC
=/opt
/centos
/devtoolset-1.1
/root
/usr
/bin
/gcc
84 export CPP
=/opt
/centos
/devtoolset-1.1
/root
/usr
/bin
/cpp
85 export CXX
=/opt
/centos
/devtoolset-1.1
/root
/usr
/bin
/c
++
86 export PATH
=$PATH:/opt
/centos
/devtoolset-1.1
/root
/usr
/bin
88 if ! rpm
-qa |
grep --quiet gflags
; then
89 rpm
-i https
://github.com
/schuhschuh
/gflags
/releases
/download
/v2.1
.0/gflags-devel-2.1
.0-1.amd64.rpm
101 make install INSTALL_PATH
=package
108 --url http
://rocksdb.org
/ \
112 --description "RocksDB is an embeddable persistent key-value store for fast storage." \