Skip to content

Commit 88132d2

Browse files
authored
Merge pull request #88 from fledge-iot/2.3.0RC
2.3.0RC
2 parents c11877d + 4a7c959 commit 88132d2

File tree

11 files changed

+55
-66
lines changed

11 files changed

+55
-66
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ others/S2OPC
1919
others/check-0.15.2.tar.gz
2020
others/check-0.15.2
2121
others/libexpat
22+
others/scripts/mqtt/paho.mqtt.c*
2223

2324
# Archived packages
2425
plugins/archive

others/make_deb

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
set -e
2323

2424
USAGE="$(basename "$0") [-h] [-a] ...
25-
This script is used to create the Debian package for to support other additional libraries as separately such as mqtt, gcp
25+
This script is used to create the Debian package for to support other additional libraries as separately such as mqtt, s2opcua etc.
2626
2727
Arguments:
2828
-h - Display this help text
@@ -99,9 +99,12 @@ if [[ ${branch_name} != "main" ]] && [[ ! ${branch_name} =~ ^[0-9]+\.[0-9]+\.[0-
9999
if [ ! -d "${archive}/${architecture}" ]; then
100100
mkdir -p "${archive}/${architecture}"
101101
fi
102+
102103
os_name=`(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
103104
os_version=`(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')`
104-
echo "Platform is ${os_name}, Version: ${os_version}"
105+
v_name=`(grep -o '^VERSION_CODENAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/VERSION_CODENAME=//g')`
106+
echo "Platform is ${os_name}, Version: ${os_version}, Version code name: ${v_name}"
107+
105108
# Print the summary of findings
106109
echo "Additional ${ADDITIONAL_LIB_NAME} Package version is : ${version}"
107110
echo "The Fledge required version is : ${fledge_version}"
@@ -127,15 +130,21 @@ if [[ ${branch_name} = "main" ]] || [[ ${branch_name} =~ ^[0-9]+\.[0-9]+\.[0-9]+
127130
# Debian file structure
128131
mkdir -p usr/local/lib
129132
if [ "${ADDITIONAL_LIB_NAME}" == "mqtt" ]; then
130-
cp -R --preserve=links /usr/local/lib/libpaho* usr/local/lib
131-
fi
132-
if [ "${ADDITIONAL_LIB_NAME}" == "gcp" ]; then
133-
cp -R --preserve=links /usr/local/lib/libjwt* usr/local/lib
134-
cp -R --preserve=links /usr/local/lib/libjansson* usr/local/lib
133+
# For Raspberry Pi OS Bullseye
134+
if [[ ${v_name} == *"bullseye"* ]]; then # Verify Ubuntu20.04 aarch64
135+
if [[ ${architecture} == *"armv7l"* ]]; then
136+
cp -R --preserve=links /usr/local/lib/arm-linux-gnueabihf/libpaho* usr/local/lib
137+
else # aarch64
138+
cp -R --preserve=links /usr/local/lib/aarch64-linux-gnu/libpaho* usr/local/lib
139+
fi
140+
else
141+
cp -R --preserve=links /usr/local/lib/libpaho* usr/local/lib
142+
fi
135143
fi
136144
if [ "${ADDITIONAL_LIB_NAME}" == "iec" ]; then
137-
# For Raspbian bullseye
138-
if [[ ${os_name} == *"Raspbian"* && ${os_version} == *"11"* ]]; then
145+
# For Raspberry Pi OS Bullseye
146+
if [[ ${v_name} == *"bullseye"* ]]; then
147+
# arch based check?
139148
cp -R --preserve=links /usr/local/lib/arm-linux-gnueabihf/libiec61850* usr/local/lib
140149
else
141150
cp -R --preserve=links /usr/local/lib/libiec61850* usr/local/lib

others/make_rpm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,7 @@ mkdir -p usr/local/lib64
148148
if [ "${ADDITIONAL_LIB_NAME}" == "mqtt" ]; then
149149
cp -R --preserve=links /usr/local/lib64/libpaho* usr/local/lib64
150150
fi
151-
# TODO: FOGL-3632 - Blocked with its compilation
152-
#if [ "${ADDITIONAL_LIB_NAME}" == "gcp" ]; then
153-
# cp -R --preserve=links /usr/local/lib64/libjwt* usr/local/lib64
154-
# cp -R --preserve=links /usr/local/lib64/libjansson* usr/local/lib64
155-
#fi
151+
156152
if [ "${ADDITIONAL_LIB_NAME}" == "iec" ]; then
157153
mkdir -p usr/local/lib
158154
cp -R --preserve=links /usr/local/lib/liblib60870* usr/local/lib

others/scripts/gcp/Description

Lines changed: 0 additions & 1 deletion
This file was deleted.

others/scripts/gcp/VERSION

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

others/scripts/gcp/requirements.sh

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

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.2.0
2-
fledge_version>=2.2
1+
fledge_iec_version=2.3.0
2+
fledge_version>=2.3

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.2.0
2-
fledge_version>=2.2
1+
fledge_mqtt_version=2.3.0
2+
fledge_version>=2.3
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2+
index e2b934a..9d5e9a0 100644
3+
--- a/src/CMakeLists.txt
4+
+++ b/src/CMakeLists.txt
5+
@@ -94,7 +94,7 @@ target_compile_definitions(paho-cpp-objs PRIVATE PAHO_MQTTPP_EXPORTS)
6+
target_compile_options(paho-cpp-objs PRIVATE
7+
$<$<CXX_COMPILER_ID:MSVC>:/W3>
8+
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Wdocumentation>
9+
- $<$<NOT:$<CXX_COMPILER_ID:MSVC,Clang>>:-Wall -Wextra>
10+
+ $<$<NOT:$<OR:$<CXX_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:Clang>>>:-Wall -Wextra>
11+
)
12+
13+
## --- Build the shared library, if requested ---

others/scripts/mqtt/requirements.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,24 @@ else
4949
echo "Requirements are not supported for platform: ${os_name} and having version: ${os_version}"
5050
fi
5151
rm -rf paho.mqtt.c
52-
git clone https://github.com/eclipse/paho.mqtt.c.git
52+
git clone --depth 1 --branch v1.3.13 https://github.com/eclipse/paho.mqtt.c.git
5353
cd paho.mqtt.c
5454
mkdir build
5555
cd build
56-
cmake -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_WITH_SSL=FALSE ..
56+
cmake -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_WITH_SSL=TRUE ..
5757
make
5858
sudo make install
59+
60+
cd ..
61+
cd ..
62+
63+
rm -rf paho.mqtt.cpp
64+
git clone --depth 1 --branch v1.3.1 https://github.com/eclipse/paho.mqtt.cpp
65+
cd paho.mqtt.cpp
66+
cp ../scripts/mqtt/paho-mqtt-cpp.patch .
67+
git apply paho-mqtt-cpp.patch
68+
cmake -Bbuild -H. -DPAHO_WITH_SSL=ON -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=FALSE
69+
sudo cmake --build build/ --target install
70+
sudo ldconfig
71+
cd ..
72+

0 commit comments

Comments
 (0)