From 052a047ba2443f21bd93a717fcf9001ca1b87497 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Mon, 22 Jan 2018 09:08:59 +0100 Subject: pcr/kodi-standalone-service: updated to 1.93 --- pcr/kodi-standalone-service/PKGBUILD | 38 ++++++++++----------- pcr/kodi-standalone-service/readme.install | 53 ++++++++++++++++-------------- 2 files changed, 48 insertions(+), 43 deletions(-) diff --git a/pcr/kodi-standalone-service/PKGBUILD b/pcr/kodi-standalone-service/PKGBUILD index 9f6823fb0..f2823a3b3 100644 --- a/pcr/kodi-standalone-service/PKGBUILD +++ b/pcr/kodi-standalone-service/PKGBUILD @@ -1,29 +1,29 @@ -# Maintainer (Arch): graysky -# Contributor (Arch): Sergej Pupykin -# Contributor (Arch): Brad Fanella -# Contributor (Arch): [vEX] -# Contributor (Arch): Zeqadious -# Contributor (Arch): BlackIkeEagle < ike DOT devolder AT gmail DOT com > -# Contributor (Arch): Bartłomiej Piotrowski -# Contributor (Arch): Maxime Gauduin -# Maintainer : André Silva +# Maintainer (AUR): graysky +# Contributor: André Silva + +# parabola changes and rationale: +# no changes. pkgname=kodi-standalone-service -pkgver=1.8 +pkgver=1.93 pkgrel=1 -pkgdesc="Systemd service and user to autostart kodi at boot" -arch=('any') -url="https://wiki.parabola.nu/index.php/Kodi#Kodi-standalone-service" +pkgdesc="Systemd service to run kodi in stand-alone mode without a DE" +# Do NOT attempt to use this package on Arch ARM! This is only for x86_64/i686. +# You have been warned. +arch=('x86_64' 'i686') +url="https://github.com/graysky2/kodi-standalone-service" license=('GPL') -depends=('systemd' 'xorg-server' 'xorg-xinit' 'kodi') +depends=('systemd' 'xorg-server' 'xorg-xinit' 'kodi' 'polkit') replaces=('xbmc-standalone-service') install=readme.install source=("https://github.com/graysky2/$pkgname/archive/v$pkgver.tar.gz") -sha256sums=('a165a66e976bb1a6ac622618887c2f9699acd84d8790af517b85a66bf5e0474c') +sha256sums=('da8fa6585b60f47242f1ae4f164f1271726047f99926f8ded3d5103b11708ac4') package() { - install -Dm644 "$srcdir/$pkgname-$pkgver/init/kodi.service" \ - "$pkgdir/usr/lib/systemd/system/kodi.service" - install -dm 700 "$pkgdir"/var/lib/kodi - chown 420:420 "$pkgdir"/var/lib/kodi + install -Dm644 "$srcdir/$pkgname-$pkgver/init/kodi.service" \ + "$pkgdir/usr/lib/systemd/system/kodi.service" + install -dm 700 "$pkgdir"/var/lib/kodi + chown 420:420 "$pkgdir"/var/lib/kodi } + +# vim:set ts=2 sw=2 et: diff --git a/pcr/kodi-standalone-service/readme.install b/pcr/kodi-standalone-service/readme.install index 0f5edbec0..3fe317b88 100644 --- a/pcr/kodi-standalone-service/readme.install +++ b/pcr/kodi-standalone-service/readme.install @@ -1,37 +1,42 @@ post_install() { - getent group xbmc > /dev/null || groupadd -g 420 xbmc - if ! getent passwd xbmc > /dev/null; then - useradd -c 'XBMC user' -u 420 -g xbmc -G audio,video,network,optical -d /var/lib/xbmc -s /sbin/nologin xbmc - passwd -l xbmc > /dev/null + getent group kodi > /dev/null || groupadd -g 420 kodi + if ! getent passwd kodi > /dev/null; then + useradd -c 'kodi user' -u 420 -g kodi -G audio,video,network,optical \ + -d /var/lib/kodi -s /usr/bin/nologin kodi + passwd -l kodi > /dev/null + [[ ! -d /var/lib/kodi/.kodi ]] && + mkdir /var/lib/kodi/.kodi && + chown -R kodi:kodi /var/lib/kodi/.kodi fi + + echo "==> Some drivers including Xorg's native modesetting may require the addition" + echo "==> of /etc/X11/Xwrapper.config for X to initialize. If kodi.service fails to" + echo "==> start, create that file containing the following single line:" + echo "==> needs_root_rights = yes" + echo "==> See: https://wiki.archlinux.org/index.php/Xorg#Rootless_Xorg_.28v1.16.29" } post_upgrade() { post_install $1 - if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then - groupmod -g 420 xbmc > /dev/null 2>&1 + if ! getent group kodi | cut -d: -f3 | grep 420 > /dev/null 2>&1; then + groupmod -g 420 kodi > /dev/null 2>&1 fi - if ! id -u xbmc | grep 420 > /dev/null 2>&1; then - usermod -u 420 xbmc > /dev/null 2>&1 - if [[ $? -ne 0 ]]; then - echo "Changing uid of user xbmc failed" - echo "It is recommended that the uid is changed." - echo "Stop all processes running under the xbmc user and reinstall xbmc" - echo "or change the uid manually. (usermod -u 420 xbmc)" - fi - chown -R xbmc:xbmc /var/lib/xbmc + if ! id -u kodi | grep 420 > /dev/null 2>&1; then + usermod -u 420 kodi > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + echo "==> Changing uid of user kodi failed." + echo "==> It is recommended that the uid is changed." + echo "==> Stop all processes running under the kodi user and reinstall kodi" + echo "==> or change the uid manually. (usermod -u 420 kodi)" + fi + chown -R kodi:kodi /var/lib/kodi fi } post_remove() { - getent passwd xbmc > /dev/null 2>&1 && userdel xbmc - getent group xbmc > /dev/null 2>&1 && groupdel xbmc + echo "==> Delete the kodi user if you are certain no processes are running under it." + echo "==> userdel kodi" + echo "==> groupdel kodi" } -post_message() { - echo "To autostart xbmc standalone, you must create or modify" - echo "/etc/X11/Xwrapper.config to contain the following 2 lines:" - echo - echo "allowed_users = anybody" - echo "needs_root_rights = yes" -} +# vim:set ts=2 sw=2 et: -- cgit v1.2.3