From 65db61cc5e9e3e93a03c63293212e87a0dff9dec Mon Sep 17 00:00:00 2001 From: SylvainCecchetto Date: Thu, 28 Sep 2017 07:54:48 +0200 Subject: [PATCH] Add Raspberry condition --- README.md | 6 ++++-- scripts/install | 5 ++++- scripts/remove | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4048799..4535073 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ Kodi for YunoHost [Kodi](https://kodi.tv) transform your YunoHost server on media center that is designed to look great on your big screen TV but is just as home on a small screen. -**Shipped version:** 16.1 from jessie backports +**Shipped version:** +* 16.1 on Debian from jessie backports +* 17.3 on Raspberry from official raspbian repo [![Install Kodi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=kodi) @@ -16,7 +18,7 @@ Kodi for YunoHost * You can launch Kodi with the ```sudo systemctl start kodi``` command ## To do -* Test package on Raspberry (maybe Kodi is avaible in v17 on raspbian repo instead of v16 in debian jessie backports) +* Test package on Raspberry * Add option to launch Kodi at server startup * Add the control web interface to YunoHost user interface * Maybe we can launch Kodi from YunoHost web interface instead of SSH diff --git a/scripts/install b/scripts/install index b3d3976..7f412c9 100644 --- a/scripts/install +++ b/scripts/install @@ -57,9 +57,12 @@ sudo cp ../conf/kodi.service /etc/systemd/system/kodi.service #================================================= -# INSTALL DEPENDENCIES +# INSTALL DEPENDENCIES AND KODI #================================================= +arch=$(uname -m) +if [[ $arch != arm* ]]; then sudo cp ../conf/kodi.list /etc/apt/sources.list.d/${app}.list +fi ynh_package_update ynh_package_install xorg dbus-x11 kodi diff --git a/scripts/remove b/scripts/remove index 8815622..40f1916 100644 --- a/scripts/remove +++ b/scripts/remove @@ -26,7 +26,10 @@ launch_on_boot=$(ynh_app_setting_get $app launch_on_boot) # Remove metapackage and its dependencies sudo sed -i 's/allowed_users=anybody/allowed_users=console/' /etc/X11/Xwrapper.config ynh_package_autoremove kodi xorg dbus-x11 +arch=$(uname -m) +if [[ $arch != arm* ]]; then sudo rm -f "/etc/apt/sources.list.d/${app}.list" +fi ynh_package_update