summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorblackhole2021-04-20 13:56:15 +0200
committerblackhole2021-04-20 13:56:15 +0200
commit51284359f4abe5df0f59e18bb23040580e19b478 (patch)
tree053383dfe573e7b48d16c76a0218299c43d80748
parent1f55122af653fa089f4aae403c955da281380bff (diff)
downloadaur-51284359f4abe5df0f59e18bb23040580e19b478.tar.gz
Using sysusers.d and tmpfiles.d for hqplayer user
-rwxr-xr-x.SRCINFO17
-rw-r--r--PKGBUILD47
-rw-r--r--hqplayer-embedded.install25
-rw-r--r--[-rwxr-xr-x]hqplayerd.service12
-rwxr-xr-xhqplayerd_user.service15
-rwxr-xr-xinstall18
-rw-r--r--sysusers.d2
-rw-r--r--tmpfiles.d1
8 files changed, 85 insertions, 52 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 173e1c725c4..e101406febc 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
pkgbase = hqplayer-embedded
pkgdesc = Signalyst HQPlayer Embedded HQPlayer - the high-end upsampling multichannel software HD-audio player
pkgver = 4.22.3
- pkgrel = 3
+ pkgrel = 4
url = http://www.signalyst.com/custom.html
- install = install
+ install = hqplayer-embedded.install
arch = x86_64
arch = aarch64
license = custom
@@ -14,7 +14,6 @@ pkgbase = hqplayer-embedded
depends = libgmpris
depends = glib2
depends = rygel
- depends = adduser-deb
depends = zip
depends = unzip
depends = wavpack
@@ -22,14 +21,18 @@ pkgbase = hqplayer-embedded
depends = openmp
conflicts = hqplayer-embedded-amd
conflicts = hqplayer-embedded-rocm
+ source = hqplayerd.service
+ source = hqplayerd_user.service
+ source = sysusers.d
+ source = tmpfiles.d
+ sha256sums = d46242c40660ddf877eff89e2459a76fe5fbecb5621fd727aad742d69cbf96d1
+ sha256sums = 5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a
+ sha256sums = 911b813c6d6b4b88daab7c28566136112f1217dce7f890902fd0f46a519c50fc
+ sha256sums = 353eb19a099092f1ee3b34b46a68e684b221003f221dc92e2c6e929311d0ff83
source_x86_64 = https://www.signalyst.eu/bins/hqplayerd/fc33/hqplayerd-4.22.3-59.fc33.x86_64.rpm
- source_x86_64 = hqplayerd.service
sha256sums_x86_64 = b98933a9c898fe14abcef0e8ec64657d737cfdf4b3678fc67c1f887776fff0e1
- sha256sums_x86_64 = 5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a
source_aarch64 = https://www.signalyst.eu/bins/hqplayerd/buster/hqplayerd_4.22.3-67_arm64.deb
- source_aarch64 = hqplayerd.service
sha256sums_aarch64 = 5ee9595652b3289fe96ad5f33102fd062d2583a1eeb65fb615293067a8d9d8f8
- sha256sums_aarch64 = 5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a
pkgname = hqplayer-embedded
diff --git a/PKGBUILD b/PKGBUILD
index c562f8fc411..a36c5d932ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,48 +1,51 @@
-## Maintainer: AudioLinux <audiolinux AT fastmail DOT fm>
+## Maintainer: AudioLinux audiolinux@fastmail.fm
pkgname=hqplayer-embedded
_rpmver=4.22.3-59
_debpkgver=4.22.3-67
pkgver=4.22.3
-pkgrel=3
+pkgrel=4
pkgdesc="Signalyst HQPlayer Embedded
HQPlayer - the high-end upsampling multichannel software HD-audio player"
arch=('x86_64' 'aarch64')
url="http://www.signalyst.com/custom.html"
license=('custom')
-depends=('alsa-lib' 'glibc' 'flac' 'gcc-libs' 'libgmpris' 'glib2' 'rygel' 'adduser-deb' 'zip' 'unzip' 'wavpack' 'gupnp' 'openmp')
-source_x86_64=("https://www.signalyst.eu/bins/hqplayerd/fc33/hqplayerd-"$_rpmver".fc33.x86_64.rpm" 'hqplayerd.service')
+depends=('alsa-lib' 'glibc' 'flac' 'gcc-libs' 'libgmpris' 'glib2' 'rygel' 'zip' 'unzip' 'wavpack' 'gupnp' 'openmp')
conflicts=('hqplayer-embedded-amd' 'hqplayer-embedded-rocm')
-install=install
-source_aarch64=("https://www.signalyst.eu/bins/hqplayerd/buster/hqplayerd_"$_debpkgver"_arm64.deb" 'hqplayerd.service')
-sha256sums_x86_64=('b98933a9c898fe14abcef0e8ec64657d737cfdf4b3678fc67c1f887776fff0e1'
-'5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a')
-sha256sums_aarch64=('5ee9595652b3289fe96ad5f33102fd062d2583a1eeb65fb615293067a8d9d8f8'
-'5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a')
+source=('hqplayerd.service'
+ 'hqplayerd_user.service'
+ 'sysusers.d'
+ 'tmpfiles.d'
+ )
+source_x86_64=("https://www.signalyst.eu/bins/hqplayerd/fc33/hqplayerd-"$_rpmver".fc33.x86_64.rpm")
+source_aarch64=("https://www.signalyst.eu/bins/hqplayerd/buster/hqplayerd_"$_debpkgver"_arm64.deb")
+sha256sums=('d46242c40660ddf877eff89e2459a76fe5fbecb5621fd727aad742d69cbf96d1'
+ '5d4194a704979b3ff92482e155769460906745a66e759142eba33a2226f9cb3a'
+ '911b813c6d6b4b88daab7c28566136112f1217dce7f890902fd0f46a519c50fc'
+ '353eb19a099092f1ee3b34b46a68e684b221003f221dc92e2c6e929311d0ff83')
+sha256sums_x86_64=('b98933a9c898fe14abcef0e8ec64657d737cfdf4b3678fc67c1f887776fff0e1')
+sha256sums_aarch64=('5ee9595652b3289fe96ad5f33102fd062d2583a1eeb65fb615293067a8d9d8f8')
+install=${pkgname}.install
package() {
if [ "$(uname -m)" == "x86_64" ]; then
bsdtar xf hqplayerd-"$_rpmver".fc33.x86_64.rpm -C "$pkgdir"
- else
- cd "$srcdir"
- bsdtar xf data.tar.xz -C "$pkgdir"
- fi
-
- install -Dm644 "hqplayerd.service" "$pkgdir/usr/lib/systemd/user/hqplayerd.service"
-
- if [ "$(uname -m)" == "x86_64" ]; then
install -Dm644 "$pkgdir/usr/share/doc/hqplayerd/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
rm "$pkgdir/usr/share/doc/hqplayerd/LICENSE"
else
+ cd "$srcdir"
+ bsdtar xf data.tar.xz -C "$pkgdir"
install -Dm644 "$pkgdir/usr/share/doc/hqplayerd/copyright" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
rm "$pkgdir/usr/share/doc/hqplayerd/copyright"
- install -Dm644 "$pkgdir/lib/systemd/system/hqplayerd.service" "$pkgdir/usr/lib/systemd/system/hqplayerd.service"
rm -rf "$pkgdir/lib"
fi
- cp "$pkgdir/etc/hqplayer/hqplayerd.xml" "$pkgdir/usr/share/doc/hqplayerd/hqplayerd.xml"
- rm "$pkgdir/etc/hqplayer/hqplayerd.xml"
-
+ install -Dm644 "hqplayerd_user.service" "$pkgdir/usr/lib/systemd/user/hqplayerd.service"
+ install -Dm644 "hqplayerd.service" "$pkgdir/usr/lib/systemd/system/hqplayerd.service"
+ install -Dm644 tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/hqplayer.conf
+ install -Dm644 sysusers.d "${pkgdir}"/usr/lib/sysusers.d/hqplayer.conf
+ install -Dm644 "$pkgdir/etc/hqplayer/hqplayerd.xml" "$pkgdir/usr/share/doc/hqplayerd/hqplayerd.xml"
+
rm -rf "$pkgdir/etc/modules-load.d"
rm -rf "$pkgdir/etc/udev"
}
diff --git a/hqplayer-embedded.install b/hqplayer-embedded.install
new file mode 100644
index 00000000000..b9cd4e4a7f9
--- /dev/null
+++ b/hqplayer-embedded.install
@@ -0,0 +1,25 @@
+post_install () {
+chown -R hqplayer:hqplayer /var/hqplayer
+chown -R hqplayer:hqplayer /etc/hqplayer
+cd /usr/lib
+ln libgupnp-1.2.so.0 libgupnp-1.0.so.4
+ln libomp.so libomp.so.5
+}
+
+post_upgrade() {
+chown -R hqplayer:hqplayer /var/hqplayer
+chown -R hqplayer:hqplayer /etc/hqplayer
+cd /usr/lib
+if [ ! -f "/usr/lib/libgupnp-1.0.so.4" ]; then
+ln libgupnp-1.2.so.0 libgupnp-1.0.so.4
+fi
+if [ ! -f "/usr/lib/libomp.so.5" ]; then
+ln libomp.so libomp.so.5
+fi
+}
+
+post_remove() {
+cd /usr/lib
+rm libgupnp-1.0.so.4
+rm libomp.so.5
+}
diff --git a/hqplayerd.service b/hqplayerd.service
index 0f65c30888c..f49c58c50e7 100755..100644
--- a/hqplayerd.service
+++ b/hqplayerd.service
@@ -1,15 +1,17 @@
[Unit]
Description=HQPlayer Embedded daemon
-Requires=sound.target
-After=sound.target
+# if your distro uses systemd-networkd you may want to add
+# systemd-networkd-wait-online.service
+Requires=network-online.target sound.target systemd-udev-settle.service
+After=network-online.target sound.target systemd-udev-settle.service local-fs.target remote-fs.target
[Service]
Type=simple
-# add the line below (with 30 or more) if hqplayerd cannot find remote NAA in time
-# ExecStartPre=/bin/sleep 30
ExecStart=/usr/bin/hqplayerd
Restart=always
RestartSec=2
+EnvironmentFile=-/etc/default/hqplayerd
+User=hqplayer
[Install]
-WantedBy=default.target
+WantedBy=multi-user.target
diff --git a/hqplayerd_user.service b/hqplayerd_user.service
new file mode 100755
index 00000000000..0f65c30888c
--- /dev/null
+++ b/hqplayerd_user.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=HQPlayer Embedded daemon
+Requires=sound.target
+After=sound.target
+
+[Service]
+Type=simple
+# add the line below (with 30 or more) if hqplayerd cannot find remote NAA in time
+# ExecStartPre=/bin/sleep 30
+ExecStart=/usr/bin/hqplayerd
+Restart=always
+RestartSec=2
+
+[Install]
+WantedBy=default.target
diff --git a/install b/install
deleted file mode 100755
index f0ed208ae94..00000000000
--- a/install
+++ /dev/null
@@ -1,18 +0,0 @@
-post_install() {
-adduser --system --disabled-login --disabled-password --home /var/hqplayer/home --ingroup audio hqplayer
-usermod -d /var/hqplayer/home hqplayer
-chown -R hqplayer:root /etc/hqplayer
-chown -R hqplayer:root /var/hqplayer/home
-cd /usr/lib
-ln libgupnp-1.2.so.0 libgupnp-1.0.so.4
-ln libomp.so libomp.so.5
-}
-
-post_remove() {
-userdel -r hqplayer
-rm -rf /var/hqplayer
-rm -rf /etc/hqplayer
-cd /usr/lib
-rm libgupnp-1.0.so.4
-rm libomp.so.5
-}
diff --git a/sysusers.d b/sysusers.d
new file mode 100644
index 00000000000..4a026014bb9
--- /dev/null
+++ b/sysusers.d
@@ -0,0 +1,2 @@
+u hqplayer - -
+m hqplayer audio
diff --git a/tmpfiles.d b/tmpfiles.d
new file mode 100644
index 00000000000..be7c6163f07
--- /dev/null
+++ b/tmpfiles.d
@@ -0,0 +1 @@
+d /var/hqplayer 0755 hqplayer hqplayer