%global commit f19013bca98b6c73837087c1205d1ec1732abbcc %global upstream_version 0.11.0 %global snapdate 20261027 # Built via .copr/Makefile (scripts/make-srpm.sh): it resolves the latest # commit on the default branch and prepends %%global commit, snapdate (commit # date) and upstream_version (latest release tag, the snapshot base), and # provides Source0 plus the vendored crates in Source1 (offline build). %global forgeurl https://github.com/mierak/rmpc %global srpm_track git %global cargo_manifest_dir . %{!?commit:%global commit 0000000000000000000000000000000000000000} %{!?upstream_version:%global upstream_version 0} %{!?snapdate:%global snapdate 19700101} %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: rmpc-git Version: %{upstream_version}^%{snapdate}git%{shortcommit} 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 %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. This package tracks the latest commit of the upstream default branch. %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=%{shortcommit} %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^20261027gitf19013b-1 - Automated build of rmpc snapshot (f19013bca98b)