diff --git a/conf/arm-chorus2.src b/conf/arm-chorus2.src new file mode 100644 index 0000000..11acb74 --- /dev/null +++ b/conf/arm-chorus2.src @@ -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= \ No newline at end of file diff --git a/scripts/install b/scripts/install index dc66cb6..7ee46f9 100644 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/remove b/scripts/remove index cab73bf..409f4d0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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 diff --git a/scripts/restore b/scripts/restore index 0219051..9b1af9c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 9988d1f..a6e3acd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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