Skip to content

Commit 4cbab93

Browse files
Merge pull request #64 from fledge-iot/2.0.0RC2
2.0.0RC2
2 parents b1c66d6 + 3150880 commit 4cbab93

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

others/scripts/s2opcua/requirements.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ tar xf check-0.15.2.tar.gz
6363
# S2OPC:
6464
rm -rf S2OPC
6565
echo "Fetching S2OPC OPC UA Toolkit libraries..."
66-
git clone https://gitlab.com/systerel/S2OPC.git
66+
git clone --depth 1 -b S2OPC_Toolkit_1.2.0 https://gitlab.com/systerel/S2OPC.git
67+
6768
(
6869
cd S2OPC
6970
cp ../scripts/s2opcua/S2OPC.patch .

packages/Debian/common/DEBIAN/postinst

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ copy_new_data () {
113113
}
114114

115115
install_pip3_packages () {
116-
pip3 install --upgrade pip
117-
pip3 install -r /usr/local/fledge/python/requirements.txt
116+
python3 -m pip install --upgrade pip
117+
python3 -m pip install -r /usr/local/fledge/python/requirements.txt
118118
}
119119

120120
# Call Fledge package update script

plugins/make_deb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ EOF
246246
fi
247247
mkdir -p build; cd build; cmake ..; make)
248248
mkdir -p "plugins/${plugin_type_install}/${plugin_install_dirname}"
249+
if [ -f "${GIT_ROOT}/extras_install.sh" ]; then
250+
sed -i "s/sudo//" ${GIT_ROOT}/extras_install.sh
251+
cp -p ${GIT_ROOT}/extras_install.sh plugins/${plugin_type_install}/${plugin_install_dirname}/extras_install.sh
252+
fi
249253
cp -R --preserve=links ${GIT_ROOT}/build/lib* "plugins/${plugin_type_install}/${plugin_install_dirname}" 2>/dev/null || \
250254
cp -R --preserve=links ${GIT_ROOT}/*.json "plugins/${plugin_type_install}/${plugin_install_dirname}" 2>/dev/null || \
251255
echo "Unable to find libraries in ${GIT_ROOT}/build and json config files in ${GIT_ROOT}, cannot proceed..."

plugins/packages/DEBIAN/postinst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,23 @@ set_files_ownership () {
3434
set_files_ownership
3535

3636
# Install Prerequisite; if any
37+
38+
# For Python based plugins
3739
if [ -f /usr/local/fledge/python/extras_install___PLUGIN_NAME__.sh ]; then
3840
sh /usr/local/fledge/python/extras_install___PLUGIN_NAME__.sh
3941
fi
40-
4142
# Install Python pip dependencies; if any
4243
if [ -f /usr/local/fledge/__INSTALL_DIR__/requirements.txt ]; then
4344
pip3 install -Ir /usr/local/fledge/__INSTALL_DIR__/requirements.txt
4445
fi
46+
47+
# For C based plugins
48+
if [ -f /usr/local/fledge/__INSTALL_DIR__/extras_install.sh ]; then
49+
./usr/local/fledge/__INSTALL_DIR__/extras_install.sh
50+
fi
51+
4552
echo __PLUGIN_NAME__ __PLUGIN_TYPE__ plugin is installed.
53+
4654
echo "
4755
__PLUGIN_NOTES__
4856
"

0 commit comments

Comments
 (0)