%global appid io.github.waylyrics.Waylyrics %global themesdir %{_datadir}/waylyrics/themes Name: waylyrics Version: 0.4.6 Release: 1%{?dist} Summary: Desktop lyrics display for Linux License: MIT URL: https://github.com/waylyrics/waylyrics Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cargo BuildRequires: rust >= 1.80 BuildRequires: gcc BuildRequires: pkgconf-pkg-config BuildRequires: gtk4-devel BuildRequires: dbus-devel BuildRequires: openssl-devel BuildRequires: gettext BuildRequires: desktop-file-utils BuildRequires: appstream Requires: hicolor-icon-theme %description Waylyrics is an on-screen (desktop) lyrics display for Linux/Unix, written in Rust with GTK4. It syncs lyrics with the currently playing track over MPRIS, fetches lyrics from NetEase Cloud Music, QQ Music and LRCLIB, and renders them in a transparent, always-on-top, optionally click-through window. Themes are plain CSS files and can be overridden per user. %prep %autosetup -n %{name}-%{version} %build # Read at compile time via option_env!(), so it must be set while cargo runs. export WAYLYRICS_THEME_PRESETS_DIR=%{themesdir} cargo build --release --locked %install install -Dpm 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 metainfo/%{appid}.desktop \ %{buildroot}%{_datadir}/applications/%{appid}.desktop install -Dpm 0644 metainfo/%{appid}.gschema.xml \ %{buildroot}%{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml install -Dpm 0644 metainfo/%{appid}.metainfo.xml \ %{buildroot}%{_datadir}/metainfo/%{appid}.metainfo.xml install -Dpm 0644 res/icons/hicolor/scalable/apps/%{appid}.svg \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{appid}.svg # Built-in themes; loaded from WAYLYRICS_THEME_PRESETS_DIR at runtime. install -d %{buildroot}%{themesdir} install -pm 0644 themes/*.css %{buildroot}%{themesdir}/ # Translations: the text domain is "waylyrics" (see gettextrs::TextDomain). for po in locales/*/LC_MESSAGES/%{name}.po; do lang=$(basename "$(dirname "$(dirname "$po")")") install -d %{buildroot}%{_datadir}/locale/"$lang"/LC_MESSAGES msgfmt -o %{buildroot}%{_datadir}/locale/"$lang"/LC_MESSAGES/%{name}.mo "$po" done %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{appid}.desktop appstreamcli validate --no-net %{buildroot}%{_datadir}/metainfo/%{appid}.metainfo.xml %files %license LICENSE %doc README.md README.en.md CHANGELOG.md %{_bindir}/%{name} %{_datadir}/applications/%{appid}.desktop %{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml %{_datadir}/metainfo/%{appid}.metainfo.xml %{_datadir}/icons/hicolor/scalable/apps/%{appid}.svg %{_datadir}/waylyrics/ %{_datadir}/locale/*/LC_MESSAGES/%{name}.mo %changelog * Mon Sep 21 2026 chinese-yening - 0.4.6-1 - Initial COPR package for waylyrics 0.4.6