From bd26b462c451bbf0f13a323b4942c89a2c439844 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 22 Jan 2015 15:05:00 -0200 Subject: rename xbmc-standalone-service to kodi-standalone-service --- pcr/kodi-standalone-service/PKGBUILD | 29 +++++++++++++++++++++++ pcr/kodi-standalone-service/readme.install | 37 ++++++++++++++++++++++++++++++ pcr/xbmc-standalone-service/PKGBUILD | 28 ---------------------- pcr/xbmc-standalone-service/readme.install | 37 ------------------------------ pcr/xbmc-standalone-service/xbmc.service | 16 ------------- 5 files changed, 66 insertions(+), 81 deletions(-) create mode 100644 pcr/kodi-standalone-service/PKGBUILD create mode 100644 pcr/kodi-standalone-service/readme.install delete mode 100644 pcr/xbmc-standalone-service/PKGBUILD delete mode 100644 pcr/xbmc-standalone-service/readme.install delete mode 100644 pcr/xbmc-standalone-service/xbmc.service (limited to 'pcr') diff --git a/pcr/kodi-standalone-service/PKGBUILD b/pcr/kodi-standalone-service/PKGBUILD new file mode 100644 index 000000000..2e81d9251 --- /dev/null +++ b/pcr/kodi-standalone-service/PKGBUILD @@ -0,0 +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 + +pkgname=kodi-standalone-service +pkgver=1.8 +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" +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=('a165a66e976bb1a6ac622618887c2f9699acd84d8790af517b85a66bf5e0474c') + +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/pcr/kodi-standalone-service/readme.install b/pcr/kodi-standalone-service/readme.install new file mode 100644 index 000000000..0f5edbec0 --- /dev/null +++ b/pcr/kodi-standalone-service/readme.install @@ -0,0 +1,37 @@ +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 + fi +} + +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 + 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 + fi +} + +post_remove() { + getent passwd xbmc > /dev/null 2>&1 && userdel xbmc + getent group xbmc > /dev/null 2>&1 && groupdel xbmc +} + +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" +} diff --git a/pcr/xbmc-standalone-service/PKGBUILD b/pcr/xbmc-standalone-service/PKGBUILD deleted file mode 100644 index e0bb7537a..000000000 --- a/pcr/xbmc-standalone-service/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# 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 - -pkgname=xbmc-standalone-service -pkgver=1.0 -pkgrel=4 -pkgdesc="Systemd service and user to autostart xbmc at boot" -arch=('any') -url="https://wiki.parabolagnulinux.org/index.php/Xbmc#Autostarting_at_boot" -license=('GPL') -depends=('xbmc' 'systemd' 'xorg-xinit') -install=readme.install -source=(xbmc.service) -sha256sums=('1a94a7952ef99cd3dd6f4b921630563f72a3b907265e91e0a37b07339081558c') - -package() { - install -Dm0644 "$srcdir/xbmc.service" "$pkgdir/usr/lib/systemd/system/xbmc.service" - - install -dm 700 "${pkgdir}"/var/lib/xbmc - chown 420:420 "${pkgdir}"/var/lib/xbmc -} diff --git a/pcr/xbmc-standalone-service/readme.install b/pcr/xbmc-standalone-service/readme.install deleted file mode 100644 index 0f5edbec0..000000000 --- a/pcr/xbmc-standalone-service/readme.install +++ /dev/null @@ -1,37 +0,0 @@ -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 - fi -} - -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 - 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 - fi -} - -post_remove() { - getent passwd xbmc > /dev/null 2>&1 && userdel xbmc - getent group xbmc > /dev/null 2>&1 && groupdel xbmc -} - -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" -} diff --git a/pcr/xbmc-standalone-service/xbmc.service b/pcr/xbmc-standalone-service/xbmc.service deleted file mode 100644 index 90119f07d..000000000 --- a/pcr/xbmc-standalone-service/xbmc.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description = Starts instance of XBMC using xinit -After = systemd-user-sessions.service network.target -Conflicts=getty@tty7.service - -[Service] -User = xbmc -Group = xbmc -PAMName=login -Type = simple -TTYPath=/dev/tty7 -ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -- :0 -nolisten tcp vt7 -Restart = on-abort - -[Install] -WantedBy = multi-user.target -- cgit v1.2.3