diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 70d57dc..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: graysky -# Contributor: Sergej Pupykin -# Contributor: Brad Fanella -# Contributor: [vEX] -# Contributor: Zeqadious -# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com > -# Contributor: Bartłomiej Piotrowski -# Contributor: Maxime Gauduin - -pkgname=kodi-standalone-service -pkgver=1.7 -pkgrel=1 -pkgdesc="Systemd service and user to autostart kodi at boot" -arch=('any') -url="https://wiki.archlinux.org/index.php/Kodi#Kodi-standalone-service" -license=('GPL') -depends=('systemd' 'xorg-server' 'xorg-xinit' 'kodi') -replaces=('xbmc-standalone-service') -install=readme.install -source=("https://github.com/graysky2/$pkgname/archive/v$pkgver.tar.gz") -sha256sums=('44a4f1ad4e800bf3973d164b403742b53789e7006ba113ed6b569e3e6353ac70') - -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 -} diff --git a/README.md b/README.md index cd7822e..d094851 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,8 @@ A simple systemd service file to run kodi in standalone mode. * systemd * xorg-server with xorg-xinit -## Post-install instructions -If using xorg version >=1.16 then create /etc/X11/Xwrapper.config containing this line: - - allowed_users = anybody - -Note that the systemd service requires /var/lib/kodi to be user kodi's homedir. See the readme.install which contains scriptlets used by the Arch Linux package system. Users of other distros can adapt the code therein. +## Note +Users no longer require `/etc/X11/Xwrapper.config` on the system anymore since the created X server becomes the [controlling process](http://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardInput=) of the VT to which it is bound. ## Credit Credit for the service given to the Arch Linux maintainers of the official kodi package. diff --git a/readme.install b/readme.install index 52d1370..941b8d7 100644 --- a/readme.install +++ b/readme.install @@ -33,6 +33,14 @@ post_upgrade() { echo "cp -a /var/lib/xbmc/.xbmc/* /var/lib/kodi/.kodi" echo "chown -R kodi:kodi /var/lib/kodi" fi + + if [ "$(vercmp $2 1.8-1)" -lt 1 ]; then + if [[ -f /etc/X11/Xwrapper.config ]]; then + echo '-> It is no longer necessary to keep /etc/X11/Xwrapper.config for kodi to start properly.' + fi + else + /bin/true + fi } post_remove() { @@ -40,14 +48,6 @@ post_remove() { getent group kodi > /dev/null 2>&1 && groupdel kodi } -post_message() { - echo "Users of Xorg >=1.16 wishing to autostart kodi standalone" - echo "must create or modify /etc/X11/Xwrapper.config to contain" - echo "the following:" - echo - echo "allowed_users = anybody" -} - pre_install() { /usr/bin/systemctl status xbmc.service &>/dev/null if [[ $? -eq 0 ]]; then