anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # O-RAN-SC |
| 4 | # |
| 5 | # Copyright (C) 2020 AT&T Intellectual Property and Nokia |
| 6 | # |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | |
| 19 | # Installs Debian package 'pistache' to support building RPMs |
| 20 | |
| 21 | echo "---> install-git-pistache.sh" |
| 22 | |
| 23 | # stop on error or unbound var, and be chatty |
| 24 | set -eux |
| 25 | echo "---> install Pistache dependencies..." |
| 26 | |
anhnghcl | 898fdd2 | 2022-06-23 11:20:48 +0000 | [diff] [blame] | 27 | export PATH=$PATH:~/.local/bin |
| 28 | export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu |
anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 29 | |
anhnghcl | 5225076 | 2022-07-20 11:02:30 +0000 | [diff] [blame] | 30 | sudo apt-get update && sudo apt-get -y install rapidjson-dev libssl-dev ninja-build |
anhnghcl | 59e74e1 | 2022-06-19 17:54:27 +0000 | [diff] [blame] | 31 | python3 -m pip install meson |
anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 32 | |
anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 33 | |
| 34 | git clone https://github.com/pistacheio/pistache.git && cd pistache && meson setup build \ |
| 35 | --buildtype=release \ |
| 36 | -DPISTACHE_USE_SSL=true \ |
| 37 | -DPISTACHE_BUILD_EXAMPLES=false \ |
| 38 | -DPISTACHE_BUILD_TESTS=false \ |
| 39 | -DPISTACHE_BUILD_DOCS=false \ |
anhnghcl | 1e4310a | 2022-07-20 07:14:18 +0000 | [diff] [blame] | 40 | --prefix="$PWD/prefix" && \ |
anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 41 | meson install -C build && \ |
| 42 | sudo cp -rf prefix/include/pistache /usr/include/pistache && \ |
czichy | f4a4cb9 | 2022-10-05 18:24:05 +0300 | [diff] [blame] | 43 | sudo cp prefix/lib/x86_64-linux-gnu/libpistache.so.0.0.5 $LIBRARY_PATH && \ |
| 44 | sudo ln -s $LIBRARY_PATH/libpistache.so.0.0.5 $LIBRARY_PATH/libpistache.so.0 && \ |
anhnghcl | 75639ea | 2022-06-16 07:11:14 +0000 | [diff] [blame] | 45 | sudo ln -s $LIBRARY_PATH/libpistache.so.0 $LIBRARY_PATH/libpistache.so && \ |
| 46 | sudo ldconfig |
| 47 | |
| 48 | echo "---> install-git-pistache.sh ends" |