]> git.proxmox.com Git - ceph.git/blob - ceph/src/Beast/scripts/install-dependencies.sh
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / scripts / install-dependencies.sh
1 #!/usr/bin/env bash
2 # Exit if anything fails.
3 set -eux
4
5 HERE=$PWD
6
7 # Override gcc version to $GCC_VER.
8 # Put an appropriate symlink at the front of the path.
9 mkdir -v $HOME/bin
10 for g in gcc g++ gcov gcc-ar gcc-nm gcc-ranlib
11 do
12 test -x $( type -p ${g}-$GCC_VER )
13 ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
14 done
15
16 if [[ -n ${CLANG_VER:-} ]]; then
17 # There are cases where the directory exists, but the exe is not available.
18 # Use this workaround for now.
19 if [[ ! -x llvm-${LLVM_VERSION}/bin/llvm-config ]] && [[ -d llvm-${LLVM_VERSION} ]]; then
20 rm -fr llvm-${LLVM_VERSION}
21 fi
22 if [[ ! -d llvm-${LLVM_VERSION} ]]; then
23 mkdir llvm-${LLVM_VERSION}
24 LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
25 wget -O - ${LLVM_URL} | tar -Jxvf - --strip 1 -C llvm-${LLVM_VERSION}
26 fi
27 llvm-${LLVM_VERSION}/bin/llvm-config --version;
28 export LLVM_CONFIG="llvm-${LLVM_VERSION}/bin/llvm-config";
29 fi
30
31 # There are cases where the directory exists, but the exe is not available.
32 # Use this workaround for now.
33 if [[ ! -x cmake/bin/cmake && -d cmake ]]; then
34 rm -fr cmake
35 fi
36 if [[ ! -d cmake && ${BUILD_SYSTEM:-} == cmake ]]; then
37 CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
38 mkdir cmake && wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
39 fi
40
41 # NOTE, changed from PWD -> HOME
42 export PATH=$HOME/bin:$PATH
43
44 # What versions are we ACTUALLY running?
45 if [ -x $HOME/bin/g++ ]; then
46 $HOME/bin/g++ -v
47 fi
48 if [ -x $HOME/bin/clang ]; then
49 $HOME/bin/clang -v
50 fi
51 # Avoid `spurious errors` caused by ~/.npm permission issues
52 # Does it already exist? Who owns? What permissions?
53 ls -lah ~/.npm || mkdir ~/.npm
54 # Make sure we own it
55 chown -Rc $USER ~/.npm
56 # We use this so we can filter the subtrees from our coverage report
57 pip install --user https://github.com/codecov/codecov-python/archive/master.zip
58 pip install --user autobahntestsuite
59
60 bash scripts/install-boost.sh
61 bash scripts/install-valgrind.sh
62
63 # Install lcov
64 # Download the archive
65 wget http://downloads.sourceforge.net/ltp/lcov-1.12.tar.gz
66 # Extract to ~/lcov-1.12
67 tar xfvz lcov-1.12.tar.gz -C $HOME
68 # Set install path
69 mkdir -p $LCOV_ROOT
70 cd $HOME/lcov-1.12 && make install PREFIX=$LCOV_ROOT
71
72 # Install coveralls reporter
73 cd $HERE
74 mkdir -p node_modules
75 npm install coveralls