summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-01-19 13:02:26 +0100
committerKarel Kočí <cynerd@email.cz>2020-01-19 13:05:26 +0100
commitec2cfa022c50a3f7df20344cdacf5ace006d40e9 (patch)
tree9ccaae60101fd13ec0438839c2fe4b3e6d2f665f
parentbe73ce1b99508631382016323e1dae619f2f40a3 (diff)
downloadalpine-personal-pkgs-ec2cfa022c50a3f7df20344cdacf5ace006d40e9.tar.gz
alpine-personal-pkgs-ec2cfa022c50a3f7df20344cdacf5ace006d40e9.tar.bz2
alpine-personal-pkgs-ec2cfa022c50a3f7df20344cdacf5ace006d40e9.zip
spotifyd: add init script and config
-rw-r--r--spotifyd/APKBUILD7
-rw-r--r--spotifyd/spotifyd.conf43
-rwxr-xr-xspotifyd/spotifyd.init11
3 files changed, 59 insertions, 2 deletions
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čí <cynerd@email.cz>
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
+}