-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdependencies.sh
executable file
·71 lines (64 loc) · 2.07 KB
/
dependencies.sh
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
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
SUDO=sudo
if [ "$1" == "--docker" ]; then
SUDO=""
fi
#wget -P thirdparty/ http://mirrors.edge.kernel.org/ubuntu/pool/main/c/cmake/cmake_3.15.4-1ubuntu2_amd64.deb
#wget -P thirdparty/ http://mirrors.edge.kernel.org/ubuntu/pool/main/c/cmake/cmake-data_3.15.4-1ubuntu2_all.deb
CORES=$(nproc --all)
$SUDO dpkg -i ./thirdparty/cmake-data_3.15.4-1ubuntu2_all.deb
$SUDO dpkg -i ./thirdparty/cmake_3.15.4-1ubuntu2_amd64.deb
$SUDO apt-get install -f
$SUDO add-apt-repository -y ppa:pistache+team/unstable
$SUDO add-apt-repository -y ppa:mhier/libboost-latest
$SUDO apt update && $SUDO apt install -y gcc-9 g++-9 gdb make wget tar python3.7 python3-pip libboost1.70-dev libmariadbclient-dev libpistache-dev
cd thirdparty
if [[ "$1" == *"--custom-boost"* ]]; then
if [[ ! -d boost_1_69_0 ]]; then
wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
tar -xvf boost_1_69_0.tar.gz
cd boost_1_69_0
$SUDO ./bootstrap.sh
# #$SUDO ./bootstrap.sh --with-python=/usr/local/bin/python3 --with-python-version=3.7 --with-python-root=/usr/local/lib/python3.7 --prefix=/usr/
$SUDO ./b2 clean
$SUDO ./b2 --enable-unicode=ucs4 -j7 install
cd ..
fi
fi
#date
cd HowardHinnantDate/date
if [ ! -d "build" ]; then
mkdir build
fi
cd build && rm -rf *
cmake ..
make -j $CORES
$SUDO make install
cd ../../..
#sqlpp11
cd sql/sqlpp11
if [ ! -d "build" ]; then
mkdir build
fi
cd build && rm -rf *
cmake ..
make -j $CORES
$SUDO make install
cd ../../..
#connector
cd sql/sqlpp11-connector-mysql
if [ ! -d "build" ]; then
mkdir build
fi
cd build && rm -rf *
cmake -DUSE_MARIADB=1 - -DDATE_INCLUDE_DIR=/usr/local/include/ ..
make -j $CORES
$SUDO make install
cd ../../..
# Get deps for python parser
python3 -m pip install -r ../requirements.txt
# Get docker to build openapi generation
# https://hub.docker.com/r/openapitools/openapi-generator-cli/
# https://github.com/OpenAPITools/openapi-generator#16---docker
# One option is the "Codewind OpenAPI Tools" extension for visual code from IBM
# But better is the rebuild_api.sh