1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00

merge jibec into testing

This commit is contained in:
Gredin 67 2021-01-23 22:18:57 +01:00
parent a0f54a0b83
commit 7248d625c4
5 changed files with 28 additions and 25 deletions

6
conf/arm-chorus2.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/xbmc/chorus2/releases/download/2.4.4/webinterface.default.2.4.4.zip
SOURCE_SUM=efa76c18a155f263183df9eaa345e859f017000da064c35ec9809ff5c09e31c4
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View file

@ -29,7 +29,6 @@ open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
#=================================================
arch=$(uname -m)
final_path=/var/www/$app
chorus2_package="https://github.com/xbmc/chorus2/releases/download/2.4.4/webinterface.default.2.4.4.zip"
test ! -e "$final_path" || ynh_die "This path already contains a folder"
@ -77,15 +76,16 @@ fi
#=================================================
# INSTALL DEPENDENCIES AND KODI
#=================================================
dependencies=""
if [[ $arch != arm* ]]; then
cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list"
ynh_package_update
ynh_package_install xorg xinit dbus-x11 kodi
dependencies = "xorg xinit dbus-x11 kodi"
else
ynh_package_update
ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi
dependencies = "xserver-xorg-legacy xorg dbus-x11 kodi"
fi
ynh_package_update
ynh_install_app_dependencies "$dependencies"
#=================================================
# X11 SETTINGS
@ -106,10 +106,7 @@ mkdir -p "$final_path/.kodi/userdata/"
cp ../conf/advancedsettings.xml "$final_path/.kodi/userdata/advancedsettings.xml"
if [[ $arch != arm* ]]; then
wget -q $chorus2_package -P /tmp
unzip /tmp/webinterface.default.2.4.4.zip -d /tmp/
mkdir -p "$final_path/.kodi/addons/"
mv /tmp/webinterface.default/ "$final_path/.kodi/addons/webinterface.chorus2/"
ynh_setup_source "$final_path/.kodi/addons/" "arm-chorus2"
fi
chown -R "$app":"$app" "$final_path"

View file

@ -69,13 +69,10 @@ ynh_replace_string "allowed_users=anybody" "allowed_users=console" /etc/X11/Xwra
# REMOVE DEPENDENCIES AND KODI
#=================================================
if [[ $arch != arm* ]]; then
ynh_package_remove xorg xinit dbus-x11 kodi
ynh_secure_remove "/etc/apt/sources.list.d/${app}.list"
ynh_package_update
else
ynh_package_remove xserver-xorg-legacy xorg dbus-x11 kodi
ynh_secure_remove "/etc/apt/sources.list.d/${app}.list"
fi
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR

View file

@ -102,15 +102,17 @@ fi
#=================================================
# INSTALL DEPENDENCIES AND KODI
#=================================================
dependencies=""
if [[ $arch != arm* ]]; then
ynh_restore_file "/etc/apt/sources.list.d/${app}.list"
ynh_package_update
ynh_package_install xorg xinit dbus-x11 kodi
cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list"
dependencies = "xorg xinit dbus-x11 kodi"
else
ynh_package_update
ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi
dependencies = "xserver-xorg-legacy xorg dbus-x11 kodi"
fi
ynh_package_update
ynh_install_app_dependencies "$dependencies"
#=================================================
# X11 SETTINGS

View file

@ -78,16 +78,17 @@ ynh_add_systemd_config
#=================================================
# INSTALL DEPENDENCIES AND KODI
#=================================================
if [[ "$arch" != arm* ]]; then
dependencies=""
if [[ $arch != arm* ]]; then
cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list"
ynh_package_update
ynh_package_install xorg xinit dbus-x11 kodi
dependencies = "xorg xinit dbus-x11 kodi"
else
ynh_package_update
ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi
dependencies = "xserver-xorg-legacy xorg dbus-x11 kodi"
fi
ynh_package_update
ynh_install_app_dependencies "$dependencies"
#=================================================
# X11 SETTINGS