Ilya Shipitsin | 75c95aa | 2021-05-18 09:46:43 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # |
| 4 | # OT helper. script built from documentation: https://github.com/haproxytech/opentracing-c-wrapper |
| 5 | # |
| 6 | |
| 7 | set -e |
| 8 | |
Ilya Shipitsin | e9efc3a | 2022-01-15 14:23:37 +0500 | [diff] [blame] | 9 | OT_CPP_VERSION="${OT_CPP_VERSION:-1.6.0}" |
| 10 | OT_PREFIX="${OT_PREFIX:-${HOME}/opt}" |
Ilya Shipitsin | 75c95aa | 2021-05-18 09:46:43 +0000 | [diff] [blame] | 11 | |
Ilya Shipitsin | e9efc3a | 2022-01-15 14:23:37 +0500 | [diff] [blame] | 12 | wget -P download-cache/ "https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz" |
Ilya Shipitsin | 75c95aa | 2021-05-18 09:46:43 +0000 | [diff] [blame] | 13 | |
Ilya Shipitsin | e9efc3a | 2022-01-15 14:23:37 +0500 | [diff] [blame] | 14 | tar xf download-cache/v${OT_CPP_VERSION}.tar.gz |
| 15 | cd opentracing-cpp-${OT_CPP_VERSION} |
| 16 | mkdir build |
| 17 | cd build |
| 18 | cmake -DCMAKE_INSTALL_PREFIX=${OT_PREFIX} -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF .. |
| 19 | make -j$(nproc) |
| 20 | make install |
Ilya Shipitsin | 75c95aa | 2021-05-18 09:46:43 +0000 | [diff] [blame] | 21 | |
| 22 | git clone https://github.com/haproxytech/opentracing-c-wrapper.git |
| 23 | cd opentracing-c-wrapper |
| 24 | ./scripts/bootstrap |
Ilya Shipitsin | e9efc3a | 2022-01-15 14:23:37 +0500 | [diff] [blame] | 25 | ./configure --prefix=${OT_PREFIX} --with-opentracing=${OT_PREFIX} |
Willy Tarreau | 5ac9a39 | 2021-06-10 07:35:15 +0200 | [diff] [blame] | 26 | make -j$(nproc) |
Ilya Shipitsin | 75c95aa | 2021-05-18 09:46:43 +0000 | [diff] [blame] | 27 | make install |