Skip to content

Commit 5958bab

Browse files
committed
Debian extras install script handling added for C-based plugins
Signed-off-by: ashish-jabble <[email protected]>
1 parent 7bf9161 commit 5958bab

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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)