# Generated by rust2rpm 26 %bcond_without check # prevent library files from being installed %global cargo_install_lib 0 # disable debug package generation %global debug_package %{nil} Name: spotify-adblock Version: 1.0.3 %global forgeurl https://github.com/abba23/%{name} %global commit f6aa1a969658b6f03bf36e8bd4d868000b0fb80b %global date 20240913 %forgemeta Release: 1%{?dist} Summary: Adblocker for Spotify License: GPL-3.0 URL: %forgeurl Source0: %forgesource Source1: spotify-adblock.desktop BuildRequires: cargo-rpm-macros >= 26 Requires: spotify-client %global _description %{expand: Spotify adblocker for Linux (macOS untested) that works by wrapping getaddrinfo and cef_urlrequest_create. It blocks requests to domains that are not on the allowlist, as well as URLs that are on the denylist.} %description %{_description} %prep %forgeautosetup -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install install -D --mode=644 --strip target/release/libspotifyadblock.so %{buildroot}%{_libdir}/%{name}.so install -D --mode=644 config.toml %{buildroot}%{_sysconfdir}/%{name}/config.toml install -D --mode=644 %SOURCE1 %{buildroot}%{_datadir}/applications/%{name}.desktop %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE.dependencies %doc README.md %{_libdir}/%{name}.so %{_sysconfdir}/%{name}/config.toml %{_datadir}/applications/%{name}.desktop %changelog %autochangelog