%global debug_package %{nil} Name: eww Version: 0.6.0 Release: 4%{?dist} Summary: ElKowars wacky widgets . License: MIT URL: https://github.com/elkowar/eww Source0: %{url}/archive/refs/tags/v%{version}.tar.gz %if 0%{?el8} %else BuildRequires: cargo >= 1.39 BuildRequires: rust >= 1.39 %endif BuildRequires: gtk3-devel BuildRequires: gtk-layer-shell-devel BuildRequires: libdbusmenu-gtk3-devel BuildRequires: glib2-devel BuildRequires: libdbusmenu-devel Requires: gtk3 Requires: libdbusmenu Requires: gtk-layer-shell Requires: libdbusmenu-gtk3 Requires: glib2 %description Elkowars Wacky Widgets is a standalone widget system made in Rust that allows you to implement your own, custom widgets in any window manager. %prep %autosetup -p1 %if 0%{?el8} curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y %endif %install export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=3 mkdir -p %{buildroot}%{_bindir} %if 0%{?el8} $HOME/.cargo/bin/cargo build --release --no-default-features --features=wayland %else cargo build --release --no-default-features --features=wayland %endif mv ./target/release/eww %{buildroot}%{_bindir}/eww-wayland %if 0%{?el8} $HOME/.cargo/bin/cargo build --release --no-default-features --features=x11 %else cargo build --release --no-default-features --features=x11 %endif mv ./target/release/eww %{buildroot}%{_bindir}/eww-x11 rm -f %{buildroot}%{_prefix}/.crates.toml \ %{buildroot}%{_prefix}/.crates2.json strip --strip-all %{buildroot}%{_bindir}/* touch %{buildroot}%{_bindir}/eww cat >> %{buildroot}%{_bindir}/eww <