Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
| 7 | if has OSX $NODE_LABELS; then |
| 8 | set -x |
| 9 | brew update |
| 10 | brew upgrade |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame] | 11 | brew install boost sqlite3 pkg-config mysql jsoncpp libzdb |
Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 12 | brew cleanup |
| 13 | fi |
| 14 | |
| 15 | if has Ubuntu $NODE_LABELS; then |
| 16 | BOOST_PKG=libboost-all-dev |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame] | 17 | ZDB_PKG=libzdb-dev |
Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 18 | if has Ubuntu-12.04 $NODE_LABELS; then |
| 19 | BOOST_PKG=libboost1.48-all-dev |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame] | 20 | unset ZDB_PKG |
| 21 | sudo apt-get update -qq -y |
| 22 | sudo apt-get -qq -y install autoconf libtool re2c |
| 23 | pushd /tmp >/dev/null |
| 24 | sudo rm -Rf libzdb |
| 25 | git clone https://bitbucket.org/tildeslash/libzdb.git |
| 26 | pushd libzdb >/dev/null |
| 27 | git checkout -b 3-1 release-3-1 |
| 28 | ./bootstrap |
| 29 | ./configure |
| 30 | make |
| 31 | sudo make install |
| 32 | popd >/dev/null |
| 33 | popd >/dev/null |
Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 34 | fi |
| 35 | |
| 36 | set -x |
| 37 | sudo apt-get update -qq -y |
| 38 | sudo apt-get -qq -y install build-essential pkg-config $BOOST_PKG libssl-dev \ |
Chengyu Fan | b25835b | 2015-04-28 17:09:35 -0600 | [diff] [blame] | 39 | libcrypto++-dev libsqlite3-dev libmysqlclient-dev \ |
Chengyu Fan | 31737f1 | 2016-01-12 21:08:50 -0700 | [diff] [blame] | 40 | libjsoncpp-dev protobuf-compiler libprotobuf-dev $ZDB_PKG |
Chengyu Fan | 2788755 | 2015-03-26 17:12:00 -0600 | [diff] [blame] | 41 | fi |