Name: spotifyd Version: 0.4.1 Release: 1%{?dist} Summary: Lightweight Spotify daemon License: MIT URL: https://github.com/Spotifyd/spotifyd Source0: spotifyd-linux-x86_64-default.tar.gz Source1: ../Downloads/spotifyd-service/spotifyd.service BuildArch: x86_64 Requires: pipewire-pulseaudio %description Spotifyd is a lightweight Spotify daemon that supports Spotify Connect. %prep # Nothing to do for precompiled binary %install mkdir -p %{buildroot}/usr/local/bin # Extract the binary tar -xzf %{SOURCE0} -C %{buildroot}/usr/local/bin # Ensure executable permission chmod +x %{buildroot}/usr/local/bin/spotifyd # Copy systemd service mkdir -p %{buildroot}/etc/systemd/user cp %{SOURCE1} %{buildroot}/etc/systemd/user/spotifyd.service %post # Enable the service for the current user after install systemctl --user daemon-reload systemctl --user enable spotifyd.service %preun # Stop and disable service before uninstall if [ $1 -eq 0 ]; then systemctl --user stop spotifyd.service systemctl --user disable spotifyd.service fi %files /usr/local/bin/spotifyd /etc/systemd/user/spotifyd.service %changelog * Wed Aug 27 2025 Your Name - 0.4.1-1 - Added systemd user service to RPM