File: setup-buildtools.sh

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (60 lines) | stat: -rwxr-xr-x 1,510 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
set -e

# Switch to workspace root directory first
DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

if [ -f /bin/yum ] ; then
# Prefer yum over apt-get
yum -y install automake
yum -y install autoconf
yum -y install libtool
yum -y install make gcc gcc-c++
yum -y install wget
yum -y install libcurl
yum -y install zlib-devel
yum -y install git
yum -y install gperftools-libs
yum -y install libcurl-devel
yum -y install rpm-build

# Install gcc-7
# FIXME: current tooling is CentOS-centric :-/
yum -y install centos-release-scl
yum -y install devtoolset-7
yum -y install devtoolset-7-valgrind

yum-config-manager --enable rhel-server-rhscl-7-rpms

else
# Use apt-get
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -qq automake
apt-get install -qq bc
apt-get install -qq libtool-bin
apt-get install -qq cmake
apt-get install -qq curl
apt-get install -qq libcurl4-openssl-dev
apt-get install -qq zlib1g-dev
apt-get install -qq git
apt-get install -qq build-essential
apt-get install -qq libssl-dev
apt-get install -qq libsqlite3-dev
# Stock sqlite may be too old
#apt install libsqlite3-dev
apt-get install -qq wget
apt-get install -qq clang-format
apt-get install -qq libgtest-dev
apt-get install -qq libbenchmark-dev
apt-get install -qq nlohmann-json-dev
fi

# Build and install latest CMake
$DIR/setup-cmake.sh

## Change owner from root to current dir owner
chown -R `stat . -c %u:%g` *