49 lines
1.1 KiB
Plaintext

# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=spotifyd
pkgver=0.3.2
pkgrel=2
pkgdesc="Open source Spotify client running as a UNIX daemon"
url="https://github.com/Spotifyd/spotifyd"
arch="x86_64 armv7 armhf x86 ppc64le" # limited by rust/cargo + does not yet compile on aarch64
license="GPL-3.0-or-later"
makedepends="
alsa-lib-dev
cargo
dbus-dev
libogg-dev
openssl-dev
pulseaudio-dev
"
source="https://github.com/Spotifyd/spotifyd/archive/v$pkgver/spotifyd-$pkgver.tar.gz"
prepare() {
default_prepare
# Optimize binary for size (10.7 MiB -> 4.8 MiB).
cat >> Cargo.toml <<-EOF
[profile.release]
codegen-units = 1
lto = true
opt-level = "z"
panic = "abort"
EOF
}
build() {
cargo build --release --locked --features pulseaudio_backend,dbus_mpris,dbus_keyring,rodio_backend
}
check() {
cargo test --locked --target-dir=target
}
package() {
install -D -m 755 target/release/spotifyd "$pkgdir/usr/bin/spotifyd"
}
sha512sums="
1a50169a23df67061cb59e8f90a6969517f38fd7d72445ecbaa8213f6300529eaa3b4d78836c339e9adbf7c9b95396e7d3120d522e2bb861ea111c25dc342d41 spotifyd-0.3.2.tar.gz
"