2015-04-03 04:34:55 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-02-11 19:48:58 +00:00
|
|
|
# Copyright (c) 2014-present, Facebook, Inc.
|
2015-04-03 04:34:55 +00:00
|
|
|
# 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_centos() {
|
|
|
|
sudo yum update -y
|
2015-04-30 22:47:33 +00:00
|
|
|
package epel-release -y
|
2015-04-03 04:34:55 +00:00
|
|
|
|
|
|
|
package texinfo
|
|
|
|
package wget
|
|
|
|
package git-all
|
|
|
|
package unzip
|
|
|
|
package xz
|
|
|
|
package xz-devel
|
|
|
|
package python-pip
|
|
|
|
package python-devel
|
|
|
|
package rpm-build
|
2015-05-29 00:21:20 +00:00
|
|
|
package ruby
|
2015-04-03 04:34:55 +00:00
|
|
|
package ruby-devel
|
|
|
|
package rubygems
|
2015-04-30 22:47:33 +00:00
|
|
|
package bzip2
|
|
|
|
package bzip2-devel
|
|
|
|
package openssl-devel
|
|
|
|
package readline-devel
|
|
|
|
package rpm-devel
|
|
|
|
package libblkid-devel
|
2015-04-03 04:34:55 +00:00
|
|
|
|
|
|
|
if [[ $DISTRO = "centos6" ]]; then
|
2015-04-30 22:47:33 +00:00
|
|
|
# Install the CentOS6 Devtools-2 yum repository.
|
|
|
|
sudo cp $FILES_DIR/centos6.devtools-2.repo /etc/yum.repos.d/
|
2015-04-03 04:34:55 +00:00
|
|
|
|
|
|
|
package devtoolset-2-gcc
|
|
|
|
package devtoolset-2-binutils
|
|
|
|
package devtoolset-2-gcc-c++
|
|
|
|
|
|
|
|
if [[ ! -e /usr/bin/gcc ]]; then
|
|
|
|
sudo ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc
|
|
|
|
fi
|
|
|
|
if [[ ! -e /usr/bin/g++ ]]; then
|
|
|
|
sudo ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/g++
|
|
|
|
fi
|
|
|
|
|
|
|
|
source /opt/rh/devtoolset-2/enable
|
|
|
|
if [[ ! -d /usr/lib/gcc ]]; then
|
|
|
|
sudo ln -s /opt/rh/devtoolset-2/root/usr/lib/gcc /usr/lib/
|
|
|
|
fi
|
|
|
|
elif [[ $DISTRO = "centos7" ]]; then
|
|
|
|
package gcc
|
|
|
|
package binutils
|
|
|
|
package gcc-c++
|
|
|
|
fi
|
|
|
|
|
|
|
|
package clang
|
|
|
|
package clang-devel
|
|
|
|
|
|
|
|
install_cmake
|
2015-04-23 00:58:08 +00:00
|
|
|
|
|
|
|
set_cc clang
|
|
|
|
set_cxx clang++
|
|
|
|
|
2015-04-03 04:34:55 +00:00
|
|
|
if [[ $DISTRO = "centos6" ]]; then
|
|
|
|
package libudev-devel
|
|
|
|
fi
|
|
|
|
|
|
|
|
package doxygen
|
|
|
|
package byacc
|
|
|
|
package flex
|
|
|
|
|
|
|
|
if [[ $DISTRO = "centos6" ]]; then
|
2015-06-02 10:05:47 +00:00
|
|
|
remove_package autoconf
|
|
|
|
remove_package automake
|
|
|
|
remove_package libtool
|
|
|
|
|
2015-04-03 04:34:55 +00:00
|
|
|
install_autoconf
|
|
|
|
install_automake
|
|
|
|
install_libtool
|
2015-08-28 19:49:46 +00:00
|
|
|
|
2015-12-03 07:25:48 +00:00
|
|
|
install_bison
|
|
|
|
|
2015-08-28 19:49:46 +00:00
|
|
|
package file-libs
|
2015-04-03 04:34:55 +00:00
|
|
|
elif [[ $DISTRO = "centos7" ]]; then
|
|
|
|
package autoconf
|
|
|
|
package automake
|
|
|
|
package libtool
|
2015-08-28 19:49:46 +00:00
|
|
|
package file-devel
|
2016-03-15 02:51:03 +00:00
|
|
|
package systemd-devel
|
2015-12-03 07:25:48 +00:00
|
|
|
package bison
|
2015-04-03 04:34:55 +00:00
|
|
|
fi
|
|
|
|
|
2016-03-21 01:03:30 +00:00
|
|
|
install_boost
|
|
|
|
install_gflags
|
|
|
|
install_glog
|
|
|
|
install_google_benchmark
|
|
|
|
|
2015-04-03 04:34:55 +00:00
|
|
|
install_snappy
|
|
|
|
install_rocksdb
|
2015-04-03 07:44:27 +00:00
|
|
|
install_thrift
|
2015-04-03 07:49:29 +00:00
|
|
|
install_yara
|
2016-03-11 03:36:52 +00:00
|
|
|
install_asio
|
2015-08-30 08:11:45 +00:00
|
|
|
install_cppnetlib
|
2016-03-21 01:03:30 +00:00
|
|
|
install_sleuthkit
|
2015-04-03 04:34:55 +00:00
|
|
|
|
2016-03-04 20:06:42 +00:00
|
|
|
# Device mapper uses the exact version as the ABI.
|
|
|
|
# We will build and install a static version.
|
|
|
|
remove_package device-mapper-devel
|
|
|
|
install_device_mapper
|
|
|
|
|
2015-05-13 07:31:02 +00:00
|
|
|
package libgcrypt-devel
|
|
|
|
package gettext-devel
|
|
|
|
install_libcryptsetup
|
2016-03-21 01:03:30 +00:00
|
|
|
install_iptables_dev
|
2015-05-13 07:31:02 +00:00
|
|
|
|
2015-08-16 03:43:53 +00:00
|
|
|
package audit-libs-devel
|
|
|
|
package audit-libs-static
|
|
|
|
|
2016-06-03 16:09:09 +00:00
|
|
|
gem_install fpm -v 1.3.3
|
2016-04-25 16:01:29 +00:00
|
|
|
|
|
|
|
install_aws_sdk
|
2015-04-03 04:34:55 +00:00
|
|
|
}
|