summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/kodi-standalone-service/PKGBUILD38
-rw-r--r--pcr/kodi-standalone-service/readme.install53
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 <graysky AT archlinux DOT us>
-# Contributor (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
-# Contributor (Arch): Brad Fanella <bradfanella@archlinux.us>
-# Contributor (Arch): [vEX] <niechift.dot.vex.at.gmail.dot.com>
-# Contributor (Arch): Zeqadious <zeqadious.at.gmail.dot.com>
-# Contributor (Arch): BlackIkeEagle < ike DOT devolder AT gmail DOT com >
-# Contributor (Arch): Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
-# Contributor (Arch): Maxime Gauduin <alucryd@gmail.com>
-# Maintainer : André Silva <emulatorman@hyperbola.info>
+# Maintainer (AUR): graysky <graysky AT archlinux DOT us>
+# Contributor: André Silva <emulatorman@hyperbola.info>
+
+# 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: