mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Fix missing libffi.so.7
This commit is contained in:
parent
c14b0e58b7
commit
b6bf749927
3 changed files with 28 additions and 1 deletions
|
@ -41,6 +41,26 @@ myynh_create_dir () {
|
||||||
[ -d "$1" ] || mkdir -p "$1"
|
[ -d "$1" ] || mkdir -p "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myynh_compile_libffi () {
|
||||||
|
ynh_print_info --message="Building libffi..."
|
||||||
|
|
||||||
|
# Create a temp direcotry
|
||||||
|
tmpdir="$(mktemp --directory)"
|
||||||
|
cd "$tmpdir"
|
||||||
|
|
||||||
|
# Download
|
||||||
|
wget "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz"
|
||||||
|
|
||||||
|
# Extract
|
||||||
|
tar zxf libffi-3.3.tar.gz
|
||||||
|
|
||||||
|
# Install
|
||||||
|
cd libffi-3.3
|
||||||
|
./configure
|
||||||
|
make install
|
||||||
|
ldconfig
|
||||||
|
}
|
||||||
|
|
||||||
# Install specific python version
|
# Install specific python version
|
||||||
# usage: myynh_install_python --python="3.8.6"
|
# usage: myynh_install_python --python="3.8.6"
|
||||||
# | arg: -p, --python= - the python version to install
|
# | arg: -p, --python= - the python version to install
|
||||||
|
@ -123,7 +143,7 @@ myynh_install_python () {
|
||||||
# Save python version in settings
|
# Save python version in settings
|
||||||
ynh_app_setting_set --app=$app --key=python --value="$python"
|
ynh_app_setting_set --app=$app --key=python --value="$python"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install/Upgrade Homeassistant in virtual environement
|
# Install/Upgrade Homeassistant in virtual environement
|
||||||
myynh_install_homeassistant () {
|
myynh_install_homeassistant () {
|
||||||
ynh_exec_as $app -H -s /bin/bash -c " \
|
ynh_exec_as $app -H -s /bin/bash -c " \
|
||||||
|
|
|
@ -70,6 +70,10 @@ ynh_app_setting_set --app=$app --key=port --value="$port"
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
# Install libffi-3.3 if libffi.so.7 is missing (buster)
|
||||||
|
[[ $(ldconfig -p | grep libffi.so.7) ]] || myynh_compile_libffi
|
||||||
|
|
||||||
myynh_install_python --python="$py_required_version"
|
myynh_install_python --python="$py_required_version"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -153,6 +153,9 @@ ynh_script_progression --message="Upgrading dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
# Install libffi-3.3 if libffi.so.7 is missing (buster)
|
||||||
|
[[ $(ldconfig -p | grep libffi.so.7) ]] || myynh_compile_libffi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue