Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-smf
Commits
600c39ae
Commit
600c39ae
authored
Sep 24, 2019
by
Tien-Thinh Nguyen
Browse files
install Pistache
parent
a39506cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
build/scripts/build_helper.spgw
View file @
600c39ae
...
...
@@ -104,6 +104,54 @@ install_spdlog_from_git() {
return 0
}
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_pistache_from_git() {
if [ $1 -eq 0 ]; then
read -p "Do you want to install Pistache ? <y/N> " prompt
OPTION=""
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
GIT_URL=https://github.com/oktal/pistache.git
echo "Install Pistache from $GIT_URL"
pushd $OPENAIRCN_DIR/build/ext
echo "Downloading Pistache"
if [[ $OPTION =~ -[yY](es)* ]]
then
$SUDO rm -rf pistache
fi
git clone $GIT_URL
git submodule update --init
cd pistache && git checkout master
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
cd pistache
mkdir _build && cd _build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
make
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
# enable syslog, Useless (defined in SPGW code)
sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h
popd
fi
return 0
}
#-------------------------------------------------------------------------------
...
...
@@ -196,6 +244,9 @@ check_install_spgwc_deps() {
libxml2-dev \
openssl \
python \
nettle-dev \
libcurl4 \
net-tools \
pkg-config"
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
PACKAGE_LIST="\
...
...
@@ -231,6 +282,9 @@ check_install_spgwc_deps() {
install_spdlog_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
install_pistache_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
return 0
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment