From ec2cfa022c50a3f7df20344cdacf5ace006d40e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Jan 2020 13:02:26 +0100 Subject: spotifyd: add init script and config --- spotifyd/APKBUILD | 7 +++++-- spotifyd/spotifyd.conf | 43 +++++++++++++++++++++++++++++++++++++++++++ spotifyd/spotifyd.init | 11 +++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 spotifyd/spotifyd.conf create mode 100755 spotifyd/spotifyd.init diff --git a/spotifyd/APKBUILD b/spotifyd/APKBUILD index 0985fca..a750baa 100644 --- a/spotifyd/APKBUILD +++ b/spotifyd/APKBUILD @@ -2,9 +2,9 @@ # Maintainer: Karel Kočí pkgname=spotifyd pkgver=0.2.23 -pkgrel=0 +pkgrel=1 pkgdesc="A spotify daemon" -url="https://github.com/sharkdp/fd" +url="https://github.com/Spotifyd/spotifyd" arch="x86_64 armhf aarch64" license="GPLv3" makedepends="cargo alsa-lib-dev openssl-dev" @@ -19,5 +19,8 @@ build() { package() { cargo install --path . --root="$pkgdir"/usr + install -D -m 755 "$srcdir"/spotifyd.init "$pkgdir"/etc/init.d/spotifyd + install -D -m 644 "$srcdir"/spotifyd.conf "$pkgdir"/etc/spotifyd.conf } + sha512sums="b8c0efccb6ca64b774f845a647f85b36e9565a67631719705322e723abcc3b2bf9155dfd07bd010902a4806422be29a7f32209c071738379aabfac5dead4f322 spotifyd-0.2.23.tar.gz" diff --git a/spotifyd/spotifyd.conf b/spotifyd/spotifyd.conf new file mode 100644 index 0000000..4f7c179 --- /dev/null +++ b/spotifyd/spotifyd.conf @@ -0,0 +1,43 @@ +# Spotifyd configuration file +# You have to set username and password! +# For complete documentation see: https://github.com/Spotifyd/spotifyd +################################################################################## +[global] +# Your Spotify account name. +#username = username + +# Your Spotify account password. +#password = password + +# The name that gets displayed under the connect tab on +# official clients. Spaces are not allowed! +#device_name = alpinelinux-spotifyd + +# The alsa audio device to stream audio to. To get a +# list of valid devices, run `aplay -L`, +device = sysdefault + +# The alsa mixer used by `spotifyd`. +mixer = Master + +################################################################################## + +# The audio bitrate. 96, 160 or 320 kbit/s +bitrate = 320 + +# The director used to cache audio data. This setting can save +# a lot of bandwidth when activated, as it will avoid re-downloading +# audio files when replaying them. +# +# Note: The file path does not get expanded. Environment variables and +# shell placeholders like $HOME or ~ don't work! +cache_path = /var/cache/spotifyd + +# If set to true, audio data does NOT get cached. +no_audio_cache = true + +# If set to true, enables volume normalisation between songs. +volume_normalisation = true + +# The normalisation pregain that is applied for each song. +normalisation_pregain = -10 diff --git a/spotifyd/spotifyd.init b/spotifyd/spotifyd.init new file mode 100755 index 0000000..0069c26 --- /dev/null +++ b/spotifyd/spotifyd.init @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +command=/usr/bin/spotifyd +pidfile=/var/run/spotifyd.pid +command_args="--pid '$pidfile'" +name="Spotify daemon" + +depend() { + need net + use logger +} -- cgit v1.2.3