From d7eb5d77c34c1d3322ebedf402e27bccea79e9c8 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Sun, 18 Aug 2019 18:38:07 +0200 Subject: [PATCH] main/postmarketos-ui-kodi: new aport (!561) --- .../60-lightdm-autologin.conf | 5 +++++ main/postmarketos-ui-kodi/APKBUILD | 22 +++++++++++++++++++ main/postmarketos-ui-kodi/kodi.desktop | 6 +++++ .../postmarketos-ui-kodi.post-install | 5 +++++ 4 files changed, 38 insertions(+) create mode 100644 main/postmarketos-ui-kodi/60-lightdm-autologin.conf create mode 100644 main/postmarketos-ui-kodi/APKBUILD create mode 100644 main/postmarketos-ui-kodi/kodi.desktop create mode 100644 main/postmarketos-ui-kodi/postmarketos-ui-kodi.post-install diff --git a/main/postmarketos-ui-kodi/60-lightdm-autologin.conf b/main/postmarketos-ui-kodi/60-lightdm-autologin.conf new file mode 100644 index 000000000..3a43c9e8c --- /dev/null +++ b/main/postmarketos-ui-kodi/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-kodi, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=kodi-wayland diff --git a/main/postmarketos-ui-kodi/APKBUILD b/main/postmarketos-ui-kodi/APKBUILD new file mode 100644 index 000000000..dee458668 --- /dev/null +++ b/main/postmarketos-ui-kodi/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Bart Ribbers +# Maintainer: Bart Ribbers +pkgname=postmarketos-ui-kodi +pkgver=1 +pkgrel=0 +pkgdesc="(Wayland) 10-foot UI useful on TV's" +url="https://kodi.tv" +arch="noarch" +license="GPL-3.0-or-later" +depends="kodi-wayland kodi cage lightdm xorg-server" +install="$pkgname.post-install" +source="60-lightdm-autologin.conf kodi.desktop" +options="!check" + +package() { + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf + install -Dm644 "$srcdir"/kodi.desktop \ + "$pkgdir"/usr/share/wayland-sessions/kodi-wayland.desktop +} +sha512sums="4cbef7ef9b4da927e123ea28c5918f49ec4dc1367774596e1bc192f172e1e09cb9711015e20743a7fbb3bbbc8ca6df2bee66571a28fb530e2e9d24d945eb982a 60-lightdm-autologin.conf +e8ab71c6e7d07c0c22f8f85398f33ecc7ed1b4ec865c8bf8e0d0aa589b51fbb16e79601974139990946c163c7008c67c3798bef29d10300365ac720e296729ef kodi.desktop" diff --git a/main/postmarketos-ui-kodi/kodi.desktop b/main/postmarketos-ui-kodi/kodi.desktop new file mode 100644 index 000000000..b1724a1a1 --- /dev/null +++ b/main/postmarketos-ui-kodi/kodi.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Kodi (Wayland) +Comment=This session will start Kodi media center +Exec=cage /usr/bin/kodi --windowing wayland +TryExec=/usr/lib/kodi/kodi-wayland +Type=Application diff --git a/main/postmarketos-ui-kodi/postmarketos-ui-kodi.post-install b/main/postmarketos-ui-kodi/postmarketos-ui-kodi.post-install new file mode 100644 index 000000000..a7791b1e4 --- /dev/null +++ b/main/postmarketos-ui-kodi/postmarketos-ui-kodi.post-install @@ -0,0 +1,5 @@ +#!/bin/sh + +sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf + +rc-update add lightdm default