2015-04-03 04:34:55 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Copyright (c) 2014, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
|
|
function main_ubuntu() {
|
|
|
|
if [[ $DISTRO = "precise" ]]; then
|
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
|
|
|
fi
|
|
|
|
sudo rm -Rf /var/lib/apt/lists/*
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get clean
|
|
|
|
|
|
|
|
package wget
|
|
|
|
package git
|
|
|
|
package unzip
|
|
|
|
package build-essential
|
|
|
|
package libtool
|
|
|
|
package autoconf
|
|
|
|
package automake
|
|
|
|
package pkg-config
|
|
|
|
package libssl-dev
|
|
|
|
package liblzma-dev
|
|
|
|
package bison
|
|
|
|
package flex
|
|
|
|
package python-pip
|
|
|
|
package python-dev
|
|
|
|
package libbz2-dev
|
|
|
|
package devscripts
|
|
|
|
package debhelper
|
2015-04-17 00:40:19 +00:00
|
|
|
|
|
|
|
if [[ $DISTRO = "precise" ]]; then
|
|
|
|
package clang-3.4
|
|
|
|
package clang-format-3.4
|
|
|
|
else
|
|
|
|
package clang-3.5
|
|
|
|
package clang-format-3.5
|
|
|
|
|
|
|
|
sudo ln -sf /usr/bin/clang-3.5 /usr/bin/clang
|
|
|
|
sudo ln -sf /usr/bin/clang++-3.5 /usr/bin/clang++
|
|
|
|
sudo ln -sf /usr/bin/clang-format-3.5 /usr/bin/clang-format
|
|
|
|
sudo ln -sf /usr/bin/llvm-config-3.5 /usr/bin/llvm-config
|
|
|
|
fi
|
|
|
|
|
2015-04-03 04:34:55 +00:00
|
|
|
package librpm-dev
|
|
|
|
package libdpkg-dev
|
|
|
|
package libapt-pkg-dev
|
|
|
|
package libudev-dev
|
|
|
|
package libblkid-dev
|
2015-04-25 00:01:14 +00:00
|
|
|
package libcryptsetup-dev
|
2015-04-03 04:34:55 +00:00
|
|
|
package linux-headers-generic
|
|
|
|
package ruby-dev
|
|
|
|
package gcc
|
|
|
|
package doxygen
|
|
|
|
|
|
|
|
set_cc clang
|
|
|
|
set_cxx clang++
|
|
|
|
|
|
|
|
if [[ $DISTRO = "precise" ]]; then
|
|
|
|
package rubygems
|
|
|
|
package gcc-4.8
|
|
|
|
package g++-4.8
|
2015-04-03 07:44:27 +00:00
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 150 \
|
|
|
|
--slave /usr/bin/g++ g++ /usr/bin/g++-4.8
|
2015-04-03 04:34:55 +00:00
|
|
|
install_boost
|
|
|
|
else
|
|
|
|
package libboost1.55-all-dev
|
|
|
|
fi
|
|
|
|
|
2015-04-26 10:28:54 +00:00
|
|
|
install_cmake
|
2015-04-03 04:34:55 +00:00
|
|
|
install_gflags
|
|
|
|
|
|
|
|
if [[ $DISTRO = "precise" ]]; then
|
|
|
|
remove_package libunwind7-dev
|
|
|
|
else
|
|
|
|
remove_package libunwind8-dev
|
|
|
|
fi
|
|
|
|
|
|
|
|
package libsnappy-dev
|
|
|
|
package libbz2-dev
|
|
|
|
package libreadline-dev
|
|
|
|
|
|
|
|
install_thrift
|
|
|
|
install_rocksdb
|
2015-04-03 07:49:29 +00:00
|
|
|
install_yara
|
2015-04-03 04:34:55 +00:00
|
|
|
|
|
|
|
gem_install fpm
|
|
|
|
}
|