Skip to content

Commit aff619c

Browse files
Merge pull request #83 from fledge-iot/FOGL-8209
FOGL-8209 fix for mqtt common dependency package build on bullseye
2 parents 09325b0 + 3c61ccd commit aff619c

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

others/make_deb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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,25 @@ 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
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
131143
fi
132144
if [ "${ADDITIONAL_LIB_NAME}" == "gcp" ]; then
133145
cp -R --preserve=links /usr/local/lib/libjwt* usr/local/lib
134146
cp -R --preserve=links /usr/local/lib/libjansson* usr/local/lib
135147
fi
136148
if [ "${ADDITIONAL_LIB_NAME}" == "iec" ]; then
137-
# For Raspbian bullseye
138-
if [[ ${os_name} == *"Raspbian"* && ${os_version} == *"11"* ]]; then
149+
# For Raspberry Pi OS Bullseye
150+
if [[ ${v_name} == *"bullseye"* ]]; then
151+
# arch based check?
139152
cp -R --preserve=links /usr/local/lib/arm-linux-gnueabihf/libiec61850* usr/local/lib
140153
else
141154
cp -R --preserve=links /usr/local/lib/libiec61850* usr/local/lib

0 commit comments

Comments
 (0)