%global commit c91a7999d6be6c4aecde0b0e5fd208320f04758b %global upstream_version 0.11.0 # Built via .copr/Makefile (scripts/make-srpm.sh): it resolves the latest # upstream release tag and prepends %%global commit/upstream_version, and # provides Source0 plus the vendored crates in Source1 (offline build). %global forgeurl https://github.com/mierak/rmpc %global srpm_track release %global cargo_manifest_dir . %{!?commit:%global commit 0000000000000000000000000000000000000000} %{!?upstream_version:%global upstream_version 0} %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: rmpc Version: %{upstream_version} Release: 1%{?dist} Summary: Modern, configurable, terminal based MPD client with album art support # rmpc itself is BSD-3-Clause; licenses of the statically linked crates are # listed in LICENSE.dependencies and cargo-vendor.txt. License: BSD-3-Clause URL: %{forgeurl} Source0: %{forgeurl}/archive/%{commit}/rmpc-%{commit}.tar.gz Source1: %{name}-vendor-%{shortcommit}.tar.xz ExclusiveArch: %{rust_arches} BuildRequires: cargo-rpm-macros >= 26 BuildRequires: desktop-file-utils Recommends: mpd Conflicts: rmpc-git %description rmpc is a modern, configurable, terminal based client for the Music Player Daemon (MPD), with album art support, synchronized lyrics, an audio visualizer and a fully customizable layout. %prep %autosetup -n rmpc-%{commit} -p1 -a1 %cargo_prep -v vendor # Wire vendored git dependencies (if any) next to crates.io. awk '/^\[source\./ { keep = ($0 !~ /^\[source\.(crates-io|vendored-sources)\]$/) } keep' \ vendor/vendor-config.toml >> .cargo/config.toml # Executable .rs files starting with "#![" break brp-mangle-shebangs. find vendor -type f -name "*.rs" -perm /111 -exec chmod a-x {} + %build # No .git in the tarball: feed vergen the version shown by `rmpc --version`. export VERGEN_GIT_DESCRIBE=v%{version} %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install install -Dpm0755 target/rpm/rmpc %{buildroot}%{_bindir}/rmpc # Man page and completions are generated by upstream's build.rs. install -Dpm0644 target/man/rmpc.1 %{buildroot}%{_mandir}/man1/rmpc.1 install -Dpm0644 target/completions/rmpc.bash %{buildroot}%{bash_completions_dir}/rmpc install -Dpm0644 target/completions/rmpc.fish %{buildroot}%{fish_completions_dir}/rmpc.fish install -Dpm0644 target/completions/_rmpc %{buildroot}%{zsh_completions_dir}/_rmpc desktop-file-install --dir=%{buildroot}%{_datadir}/applications assets/rmpc.desktop %check desktop-file-validate %{buildroot}%{_datadir}/applications/rmpc.desktop %{buildroot}%{_bindir}/rmpc version %files %license LICENSE LICENSE.dependencies cargo-vendor.txt %doc README.md CHANGELOG.md assets/example_config.ron assets/example_theme.ron %{_bindir}/rmpc %{_mandir}/man1/rmpc.1* %{_datadir}/applications/rmpc.desktop %{bash_completions_dir}/rmpc %{fish_completions_dir}/rmpc.fish %{zsh_completions_dir}/_rmpc %changelog * Wed Oct 28 2026 Sassech - 0.11.0-1 - Automated build of rmpc v0.11.0 (c91a7999d6be)