summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoréclairevoyant2023-06-02 20:36:01 -0400
committeréclairevoyant2023-06-02 20:36:01 -0400
commit44654d1d3edd592a756c186fb7fe00bfddc29b21 (patch)
tree237d64e9476e8ea8d89b65ade98ef815a28b695c
parented76d6ae029cf8c46310d2af03781a96a9e578df (diff)
downloadaur-44654d1d3edd592a756c186fb7fe00bfddc29b21.tar.gz
owncast: follow web app package guidelines
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD18
2 files changed, 16 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 76d596872557..7a4907cccb56 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = owncast
pkgdesc = Self-hosted live video streaming (chat included)
pkgver = 0.1.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/owncast/owncast
install = owncast.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index d1e4ca6644b9..9c798ed46af1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=owncast
pkgver=0.1.0
-pkgrel=1
+pkgrel=2
pkgdesc='Self-hosted live video streaming (chat included)'
url="https://github.com/owncast/$pkgname"
arch=(x86_64)
@@ -29,14 +29,15 @@ package() {
cd $pkgname-$pkgver
install -vDm755 $pkgname -t "$pkgdir/usr/bin/"
install -vDm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
- install -vdm755 "$pkgdir/var/www/$pkgname/"
install -vDm644 /dev/stdin "$pkgdir/usr/lib/systemd/system/$pkgname.service" <<eof
[Unit]
Description=Owncast Service
[Service]
Type=simple
-WorkingDirectory=/var/www/$pkgname/
+User=owncast
+Group=owncast
+WorkingDirectory=/var/lib/$pkgname/
ExecStart=/usr/bin/$pkgname
Restart=on-failure
RestartSec=5
@@ -44,4 +45,15 @@ RestartSec=5
[Install]
WantedBy=multi-user.target
eof
+
+install -vDm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" <<eof
+# Type Name ID GECOS HomeDir Shell
+u $pkgname - - /var/lib/$pkgname -
+eof
+
+ install -vDm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" <<eof
+# Type Path Mode User Group Age Argument
+d /var/lib/$pkgname 0700 $pkgname $pkgname - -
+eof
+
}