mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
Provide rc.d(8) script plus dedicated user; tests bket; help ratchov
This commit is contained in:
@@ -4,7 +4,7 @@ NOT_FOR_ARCHS = powerpc64 riscv64 sparc64
|
||||
COMMENT = Spotify client running as UNIX daemon
|
||||
DIST_TUPLE = github Spotifyd spotifyd v0.3.5 .
|
||||
CATEGORIES = audio net
|
||||
REVISION = 2
|
||||
REVISION = 3
|
||||
|
||||
MAINTAINER = Klemens Nanni <kn@openbsd.org>
|
||||
|
||||
@@ -31,10 +31,15 @@ MODCARGO_FEATURES = dbus_keyring \
|
||||
portaudio_backend
|
||||
|
||||
DOC_DIR = ${PREFIX}/doc/${PKGSTEM}
|
||||
EXAMPLES_DIR = ${PREFIX}/share/examples/${PKGSTEM}
|
||||
HOME_DIR = ${LOCALSTATEDIR}/${PKGSTEM}
|
||||
SUBST_VARS = HOME_DIR
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${DOC_DIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/docs/src/config/File.md ${DOC_DIR}/
|
||||
${INSTALL_DATA_DIR} ${EXAMPLES_DIR}
|
||||
${SUBST_DATA} {${FILESDIR},${EXAMPLES_DIR}}/${PKGSTEM}.conf
|
||||
|
||||
.include "crates.inc"
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[global]
|
||||
username = "user@example.com"
|
||||
password = "secret"
|
||||
|
||||
# TODO needs D-Bus policy to allow '_spotifyd' owning the MPRIS service
|
||||
use_mpris = false
|
||||
|
||||
#cache_path = "${HOME_DIR}/cache"
|
||||
@@ -1,5 +1,19 @@
|
||||
@newgroup _spotifyd:597
|
||||
@newuser _spotifyd:597:_spotifyd::Spotify Daemon:${HOME_DIR}:/sbin/nologin
|
||||
@rcscript ${RCDIR}/spotifyd
|
||||
@owner _spotifyd
|
||||
@group _spotifyd
|
||||
@sample ${HOME_DIR}/
|
||||
@extraunexec rm -rf ${HOME_DIR}
|
||||
@owner
|
||||
@group
|
||||
@bin bin/spotifyd
|
||||
doc/
|
||||
doc/spotifyd/
|
||||
doc/spotifyd/File.md
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/examples/spotifyd/
|
||||
share/examples/spotifyd/spotifyd.conf
|
||||
@mode 0640
|
||||
@group _spotifyd
|
||||
@sample ${SYSCONFDIR}/spotifyd.conf
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
With credentials in an XDG configuration file spotifyd is ready to run, e.g.
|
||||
as daemon in ~/.xsession or on-demand via clients such as "spotify-qt":
|
||||
|
||||
[global]
|
||||
[spotifyd]
|
||||
username = "user@example.com"
|
||||
password = "secret"
|
||||
|
||||
See https://docs.spotifyd.rs/ for more information.
|
||||
Alternatively, the rc.d(8) script runs as dedicated user, but lacks D-Bus
|
||||
configuration, hence features like the MPRIS interface do not work (yet).
|
||||
|
||||
Follow sndio(7) Authentication if both dedicated and your own user shall be
|
||||
able to play audio at the same time, e.g. on a desktop system:
|
||||
|
||||
# install -D -p -o _spotifyd -m 0600 ~/.sndio/cookie ${HOME_DIR}/.sndio/cookie
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/ksh
|
||||
|
||||
daemon="/usr/local/bin/spotifyd"
|
||||
daemon_user="_spotifyd"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_reload=NO
|
||||
|
||||
rc_cmd $1
|
||||
Reference in New Issue
Block a user