blob: fb128b39023ac993297dced1477c86ebc98e02cc [file] [log] [blame]
Ilya Shipitsin75c95aa2021-05-18 09:46:43 +00001#!/bin/bash
2
3#
4# OT helper. script built from documentation: https://github.com/haproxytech/opentracing-c-wrapper
5#
6
7set -e
8
Ilya Shipitsine9efc3a2022-01-15 14:23:37 +05009OT_CPP_VERSION="${OT_CPP_VERSION:-1.6.0}"
10OT_PREFIX="${OT_PREFIX:-${HOME}/opt}"
Ilya Shipitsin75c95aa2021-05-18 09:46:43 +000011
Ilya Shipitsine9efc3a2022-01-15 14:23:37 +050012wget -P download-cache/ "https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz"
Ilya Shipitsin75c95aa2021-05-18 09:46:43 +000013
Ilya Shipitsine9efc3a2022-01-15 14:23:37 +050014tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
15cd opentracing-cpp-${OT_CPP_VERSION}
16mkdir build
17cd build
18cmake -DCMAKE_INSTALL_PREFIX=${OT_PREFIX} -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
19make -j$(nproc)
20make install
Ilya Shipitsin75c95aa2021-05-18 09:46:43 +000021
22git clone https://github.com/haproxytech/opentracing-c-wrapper.git
23cd opentracing-c-wrapper
24 ./scripts/bootstrap
Ilya Shipitsine9efc3a2022-01-15 14:23:37 +050025 ./configure --prefix=${OT_PREFIX} --with-opentracing=${OT_PREFIX}
Willy Tarreau5ac9a392021-06-10 07:35:15 +020026 make -j$(nproc)
Ilya Shipitsin75c95aa2021-05-18 09:46:43 +000027 make install