# Generated by rust2rpm 27 %bcond check 1 %global crate spotifyd Name: rust-spotifyd Version: 0.4.1 Release: 4%{?dist} Summary: Spotify daemon License: GPL-3.0-only URL: https://crates.io/crates/spotifyd Source: %{crates_source} # Systemd unit specifications Source: spotifyd-system.service Source: spotifyd-user.service # Service configuration Source: spotifyd.conf # User/Group allocation Source: spotifyd.sysusers # Firewall rules Source: spotify-connect.xml # Automatically generated patch to strip dependencies and normalize metadata Patch: spotifyd-fix-metadata-auto.diff # Relax version requirements for dependencies shipped in Fedora Patch: 0001-relax-version-contrainsts-on-dependencies.patch # Patch back-ported from https://github.com/Spotifyd/spotifyd/pull/1371 Patch: 0002-port-to-librespot-0.7.1.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: systemd-rpm-macros BuildRequires: firewalld-filesystem %global _description %{expand: A Spotify daemon.} %description %{_description} %package -n %{crate} Summary: %{summary} License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (MIT OR Apache-2.0) AND Unicode-3.0 AND 0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSL-1.0 AND Apache-2.0 OR MIT AND Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT AND BSD-2-Clause OR Apache-2.0 OR MIT AND BSD-3-Clause AND GPL-3.0-only AND ISC AND (Apache-2.0 OR ISC) AND OpenSSL AND LGPL-3.0-or-later OR MPL-2.0 AND MIT AND MIT OR Zlib OR Apache-2.0 AND MPL-2.0 AND Unicode-3.0 AND Unlicense OR MIT AND Zlib AND Zlib OR Apache-2.0 OR MIT Requires: avahi Requires: firewalld-filesystem %{?sysusers_requires_compat} %description -n %{crate} %{_description} %pre -n %{crate} %sysusers_create_compat %{SOURCE4} %post -n %{crate} %systemd_post %{crate}.service %systemd_user_post %{crate}.service %firewalld_reload %preun -n %{crate} %systemd_preun %{crate}.service %systemd_user_preun %{crate}.service %postun -n %{crate} %systemd_postun_with_restart %{crate}.service %systemd_user_postun_with_restart %{crate}.service %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc CHANGELOG.md %doc CONTRIBUTING.md %doc CONTRIBUTORS.md %doc README.md %{_bindir}/spotifyd %dir %attr(700,spotifyd,spotifyd) %{_localstatedir}/cache/%{crate} %{_unitdir}/%{crate}.service %{_userunitdir}/%{crate}.service %config(noreplace) %{_sysconfdir}/%{crate}.conf %{_sysusersdir}/%{crate}.conf %{_prefix}/lib/firewalld/services/spotify-connect.xml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f dbus_mpris %build %cargo_build -f dbus_mpris %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install -f dbus_mpris install -dm 0700 %{buildroot}%{_localstatedir}/cache/%{crate} install -Dm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{crate}.service install -Dm 0644 %{SOURCE2} %{buildroot}%{_userunitdir}/%{crate}.service install -Dm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{crate}.conf install -Dm 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{crate}.conf install -Dm 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/firewalld/services/spotify-connect.xml %if %{with check} %check %cargo_test %endif %changelog * Tue Oct 21 2025 Mat Booth - 0.4.1-4 - Backport patches to bump the librespot dependency to 0.7.1 * Mon Oct 20 2025 Mat Booth - 0.4.1-3 - Install a cache directory * Mon Oct 20 2025 Mat Booth - 0.4.1-2 - Rebuild against librespot-discovery changes * Mon Oct 20 2025 Mat Booth - 0.4.1-1 - Update to 0.4.1 * Mon Dec 02 2024 Mat Booth - 0.3.5-6 - Bump rspotify and alsa versions * Mon Apr 15 2024 Mat Booth - 0.3.5-5 - Enable MPRIS interface * Mon Apr 08 2024 Mat Booth - 0.3.5-4 - Create a system user and allow running as a system service - Add firewall rules * Mon Apr 08 2024 Mat Booth - 0.3.5-3 - Fix licenses and install unit as user service as designed * Mon Apr 08 2024 Mat Booth - 0.3.5-2 - Use avahi instead of embedded mdns service - Install a config file * Mon Apr 08 2024 Mat Booth - 0.3.5-1 - Initial package