summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kodi-x11/APKBUILD17
-rw-r--r--kodi-x11/kodi-x11.pre-install10
-rw-r--r--kodi-x11/kodi.init17
-rw-r--r--pkgs-root/APKBUILD4
4 files changed, 46 insertions, 2 deletions
diff --git a/kodi-x11/APKBUILD b/kodi-x11/APKBUILD
new file mode 100644
index 0000000..708e287
--- /dev/null
+++ b/kodi-x11/APKBUILD
@@ -0,0 +1,17 @@
+# Contributor: Karel Kočí <cynerd@email.cz>
+# Maintainer: Karel Kočí <cynerd@email.cz>
+pkgname=kodi-x11
+pkgver=0.1
+pkgrel=1
+pkgdesc="Kodi with user kodi and init"
+url="https://git.cynerd.cz/alpine-personal-pkgs/"
+arch="noarch"
+license="GPL-3.0+"
+options="!check"
+
+depends="kodi kodi-bin kodi-polkit"
+install="$pkgname.pre-install"
+
+package() {
+ install -Dm755 "$srcdir"/kodi.init "$pkgdir"/etc/init.d/kodi
+}
diff --git a/kodi-x11/kodi-x11.pre-install b/kodi-x11/kodi-x11.pre-install
new file mode 100644
index 0000000..3302761
--- /dev/null
+++ b/kodi-x11/kodi-x11.pre-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+addgroup -S kodi 2>/dev/null
+adduser -S -D -h /var/lib/kodi -s /sbin/nologin -G kodi kodi 2>/dev/null
+
+for group in video dialout audio input usb; do
+ adduser kodi $group 2>/dev/null
+done
+
+exit 0
diff --git a/kodi-x11/kodi.init b/kodi-x11/kodi.init
new file mode 100644
index 0000000..89ae701
--- /dev/null
+++ b/kodi-x11/kodi.init
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+supervisor=supervise-daemon
+
+name="Kodi"
+description="A software media player and entertainment hub for digital media"
+
+command="/usr/bin/xinit"
+command_args="/usr/bin/kodi-standalone -- :0"
+command_user="kodi:kodi"
+command_background="yes"
+directory="/var/lib/kodi"
+pidfile="/var/run/kodi.pid"
+
+depend() {
+ need net
+}
diff --git a/pkgs-root/APKBUILD b/pkgs-root/APKBUILD
index d3378a7..a9cba3e 100644
--- a/pkgs-root/APKBUILD
+++ b/pkgs-root/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Karel Kočí <cynerd@email.cz>
# Maintainer: Karel Kočí <cynerd@email.cz>
pkgname=pkgs-root
-pkgver=0.3.6
+pkgver=0.3.7
pkgrel=1
pkgdesc="Personal root package"
url="https://git.cynerd.cz/alpine-personal-pkgs/"
@@ -83,7 +83,7 @@ mpd() {
kodi() {
depends="
$pkgname-base
- kodi kodi-bin
+ kodi-x11
"
mkdir -p "$pkgdir-kodi"
}