@@ -25,8 +25,10 @@ set -e
25
25
os_name=$( grep -o ' ^NAME=.*' /etc/os-release | cut -f2 -d\" | sed ' s/"//g' )
26
26
os_version=$( grep -o ' ^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed ' s/"//g' )
27
27
echo " Platform is ${os_name} , Version: ${os_version} "
28
+ git_root=$( pwd)
28
29
29
30
# mbedtls-dev:
31
+ cd ${git_root}
30
32
mbetls_version=' 2.28.7'
31
33
if [[ $os_name == * " Red Hat" * || $os_name == * " CentOS" * ]]; then
32
34
echo " RHEL/CentOS platform is not currently supported by this plugin."
44
46
fi
45
47
46
48
# libexpat:
49
+ cd ${git_root}
47
50
libexpat_version=" 2.6.0"
48
51
rm -rf expat-${libexpat_version} .tar.gz expat-${libexpat_version}
49
52
wget https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-${libexpat_version} .tar.gz
@@ -52,19 +55,20 @@ tar xzvf expat-${libexpat_version}.tar.gz
52
55
cd expat-${libexpat_version}
53
56
mkdir build
54
57
cd build
55
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DEXPAT_SHARED_LIBS=OFF ..
58
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DEXPAT_SHARED_LIBS=ON ..
56
59
make
57
60
sudo make install
58
61
)
59
62
60
63
# libcheck:
64
+ cd ${git_root}
61
65
lib_check_version=" 0.15.2"
62
66
rm -rf check-${lib_check_version} .tar.gz check-${lib_check_version}
63
67
wget https://github.com/libcheck/check/releases/download/${lib_check_version} /check-${lib_check_version} .tar.gz
64
68
tar xf check-${lib_check_version} .tar.gz
65
69
(
66
70
cd check-${lib_check_version}
67
- cp ../../.. /scripts/s2opcua/check-${lib_check_version} _CMakeLists.txt.patch .
71
+ cp ${git_root} /scripts/s2opcua/check-${lib_check_version} _CMakeLists.txt.patch .
68
72
patch < check-${lib_check_version} _CMakeLists.txt.patch # update the CMakeLists.txt file
69
73
rm -f CMakeCache.txt
70
74
mkdir -p build
@@ -73,6 +77,7 @@ tar xf check-${lib_check_version}.tar.gz
73
77
)
74
78
75
79
# S2OPC
80
+ cd ${git_root}
76
81
s2opc_toolkit_version=" 1.5.0"
77
82
rm -rf S2OPC
78
83
git clone https://gitlab.com/systerel/S2OPC.git --branch S2OPC_Toolkit_${s2opc_toolkit_version} --depth 1
0 commit comments