-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-dependencies.sh
More file actions
executable file
·66 lines (52 loc) · 1.8 KB
/
Copy pathinstall-dependencies.sh
File metadata and controls
executable file
·66 lines (52 loc) · 1.8 KB
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
#!/bin/bash
# Installing dependencies needed to build jsonArangoDB
if [ "$(uname)" == "Darwin" ]; then
# Do under Mac OS X platform
#Needs Xcode and ArangoDB server locally installed
brew upgrade
brew install cmake
#brew install arangodb
CXXSTANDARD=20
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
#Needs gcc v.5 or higher and ArangoDB server locally installed
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
CXXSTANDARD=20
fi
# Uncomment what is necessary to reinstall by force
#sudo rm -rf /usr/local/include/spdlog
#sudo rm -f /usr/local/lib/libvelocypack.a
threads=3
# spdlog
# if no spdlog installed in /usr/local/include/spdlog (copy only headers)
test -d /usr/local/include/spdlog || {
# Building spdlog library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/gabime/spdlog -b v1.11.0 && \
cd spdlog/include && \
sudo cp -r spdlog /usr/local/include
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# Velocypack from ArangoDB (added for installing JSONIO database client)
# if no VPack installed in /usr/local/lib/libvelocypack.a (/usr/local/include/velocypack)
test -f /usr/local/lib/libvelocypack.a || {
# Building velocypack library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/arangodb/velocypack.git -b main
cd velocypack && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_CXX_FLAGS=-fPIC -DBuildVelocyPackExamples=OFF -DCMAKE_CXX_STANDARD=$CXXSTANDARD && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
if [ `uname -s` == Linux* ]; then
sudo ldconfig
fi