@@ -99,9 +99,12 @@ if [[ ${branch_name} != "main" ]] && [[ ! ${branch_name} =~ ^[0-9]+\.[0-9]+\.[0-
99
99
if [ ! -d " ${archive} /${architecture} " ]; then
100
100
mkdir -p " ${archive} /${architecture} "
101
101
fi
102
+
102
103
os_name=` (grep -o ' ^NAME=.*' /etc/os-release | cut -f2 -d\" | sed ' s/"//g' )`
103
104
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
+
105
108
# Print the summary of findings
106
109
echo " Additional ${ADDITIONAL_LIB_NAME} Package version is : ${version} "
107
110
echo " The Fledge required version is : ${fledge_version} "
@@ -127,15 +130,25 @@ if [[ ${branch_name} = "main" ]] || [[ ${branch_name} =~ ^[0-9]+\.[0-9]+\.[0-9]+
127
130
# Debian file structure
128
131
mkdir -p usr/local/lib
129
132
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
131
143
fi
132
144
if [ " ${ADDITIONAL_LIB_NAME} " == " gcp" ]; then
133
145
cp -R --preserve=links /usr/local/lib/libjwt* usr/local/lib
134
146
cp -R --preserve=links /usr/local/lib/libjansson* usr/local/lib
135
147
fi
136
148
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?
139
152
cp -R --preserve=links /usr/local/lib/arm-linux-gnueabihf/libiec61850* usr/local/lib
140
153
else
141
154
cp -R --preserve=links /usr/local/lib/libiec61850* usr/local/lib
0 commit comments