Skip to content

Commit 33c3849

Browse files
authored
Merge pull request #96 from fledge-iot/2.6.0RC
2.6.0RC
2 parents 039bb74 + 02a43ea commit 33c3849

File tree

7 files changed

+51
-161
lines changed

7 files changed

+51
-161
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ others/jansson
1616
others/lib60870
1717
others/libiec61850
1818
others/S2OPC
19-
others/check-0.15.2.tar.gz
20-
others/check-0.15.2
2119
others/libexpat
20+
others/check-0.15.2
21+
others/mbedtls-2.28.7
22+
others/*.tar.gz
2223
others/scripts/mqtt/paho.mqtt.c*
2324

2425
# Archived packages

others/make_deb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,15 @@ fi
154154
if [ "${ADDITIONAL_LIB_NAME}" == "s2opcua" ]; then
155155
cp -R --preserve=links /usr/local/lib/libs2opc_common.so usr/local/lib
156156
cp -R --preserve=links /usr/local/lib/libs2opc_clientserver.so usr/local/lib
157-
cp -R --preserve=links /usr/local/lib/libs2opc_clientwrapper.so usr/local/lib
158-
cp -R --preserve=links /usr/local/lib/libs2opc_commonwrapper.so usr/local/lib
159-
cp -R --preserve=links /usr/local/lib/libexpat.so.1 usr/local/lib
157+
if [[ ${v_name} == *"bullseye"* ]]; then
158+
if [[ ${architecture} == *"armv7l"* ]]; then
159+
cp -R --preserve=links /usr/local/lib/arm-linux-gnueabihf/libexpat.so.1 usr/local/lib
160+
else
161+
cp -R --preserve=links /usr/local/lib/aarch64-linux-gnu/libexpat.so.1 usr/local/lib
162+
fi
163+
else
164+
cp -R --preserve=links /usr/local/lib/libexpat.so.1 usr/local/lib
165+
fi
160166
fi
161167
echo "Done."
162168

others/scripts/iec/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_iec_version=2.5.0
2-
fledge_version>=2.5
1+
fledge_iec_version=2.6.0
2+
fledge_version>=2.6

others/scripts/mqtt/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_mqtt_version=2.5.0
2-
fledge_version>=2.5
1+
fledge_mqtt_version=2.6.0
2+
fledge_version>=2.6

others/scripts/s2opcua/S2OPC.patch

Lines changed: 0 additions & 130 deletions
This file was deleted.

others/scripts/s2opcua/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_s2opcua_version=2.5.0
2-
fledge_version>=2.5
1+
fledge_s2opcua_version=2.6.0
2+
fledge_version>=2.6

others/scripts/s2opcua/requirements.sh

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,35 @@
2222

2323
set -e
2424

25-
os_name=`(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
26-
os_version=`(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
25+
os_name=$(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
26+
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
2727
echo "Platform is ${os_name}, Version: ${os_version}"
28+
git_root=$(pwd)
2829

2930
# mbedtls-dev:
31+
cd ${git_root}
32+
mbetls_version='2.28.7'
3033
if [[ $os_name == *"Red Hat"* || $os_name == *"CentOS"* ]]; then
3134
echo "RHEL/CentOS platform is not currently supported by this plugin."
3235
exit 1
3336
else
34-
sudo apt-get install -y libmbedtls-dev
37+
rm -rf v${mbetls_version}.tar.gz mbedtls-${mbetls_version}
38+
wget "https://github.com/Mbed-TLS/mbedtls/archive/v${mbetls_version}.tar.gz"
39+
tar xzvf v${mbetls_version}.tar.gz
40+
cd mbedtls-${mbetls_version}
41+
mkdir build
42+
cd build
43+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DUSE_SHARED_MBEDTLS_LIBRARY=OFF ..
44+
make
45+
sudo make install
3546
fi
3647

3748
# libexpat:
49+
cd ${git_root}
50+
libexpat_version="2.6.0"
51+
libexpat_branch="R_${libexpat_version//./_}"
3852
rm -rf libexpat
39-
echo "Fetching an Expat, a C library for parsing XML..."
40-
git clone https://github.com/libexpat/libexpat.git
53+
git clone https://github.com/libexpat/libexpat.git --branch ${libexpat_branch} --depth 1
4154
(
4255
cd libexpat/expat
4356
./buildconf.sh && \
@@ -47,34 +60,34 @@ git clone https://github.com/libexpat/libexpat.git
4760
)
4861

4962
# libcheck:
50-
rm -rf check-0.15.2 check-0.15.2.tar.gz*
51-
wget https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz
52-
tar xf check-0.15.2.tar.gz
63+
cd ${git_root}
64+
lib_check_version="0.15.2"
65+
rm -rf check-${lib_check_version}.tar.gz check-${lib_check_version}
66+
wget https://github.com/libcheck/check/releases/download/${lib_check_version}/check-${lib_check_version}.tar.gz
67+
tar xf check-${lib_check_version}.tar.gz
5368
(
54-
cd check-0.15.2
55-
cp ../scripts/s2opcua/check-0.15.2_CMakeLists.txt.patch .
56-
patch < check-0.15.2_CMakeLists.txt.patch # update the CMakeLists.txt file
69+
cd check-${lib_check_version}
70+
cp ${git_root}/scripts/s2opcua/check-${lib_check_version}_CMakeLists.txt.patch .
71+
patch < check-${lib_check_version}_CMakeLists.txt.patch # update the CMakeLists.txt file
5772
rm -f CMakeCache.txt
5873
mkdir -p build
5974
cd build
6075
cmake .. && make -j4 && sudo make install
6176
)
6277

63-
# S2OPC:
78+
# S2OPC
79+
cd ${git_root}
80+
s2opc_toolkit_version="1.5.0"
6481
rm -rf S2OPC
65-
echo "Fetching S2OPC OPC UA Toolkit libraries..."
66-
git clone --depth 1 -b S2OPC_Toolkit_1.4.1 https://gitlab.com/systerel/S2OPC.git
67-
82+
git clone https://gitlab.com/systerel/S2OPC.git --branch S2OPC_Toolkit_${s2opc_toolkit_version} --depth 1
6883
(
6984
cd S2OPC
70-
cp ../scripts/s2opcua/S2OPC.patch .
71-
git apply S2OPC.patch
72-
BUILD_SHARED_LIBS=OFF
73-
CMAKE_INSTALL_PREFIX=/usr/local
74-
./build.sh
85+
BUILD_SHARED_LIBS=1 CMAKE_INSTALL_PREFIX=/usr/local ./build.sh
7586
echo
7687
echo "BUILD done, INSTALLING..."
7788
echo
7889
cd build
7990
sudo make install
91+
sudo cp ../src/ClientServer/frontend/client_wrapper/libs2opc_client_config_custom.h /usr/local/include/s2opc/clientserver
8092
)
93+

0 commit comments

Comments
 (0)