# Built by COPR from .copr/Makefile, which fills in the version and vendors the crates, # so the build itself runs offline. The release profile already strips the binary. %global debug_package %{nil} Name: awake Version: 0.2.0 Release: 1%{?dist} Summary: Keep the PC awake for a set time, from the tray or the command line # awake: MIT. Statically linked crates: MIT or Apache-2.0, plus ksni (Unlicense) # and unicode-ident (Unicode-3.0). License: MIT AND (MIT OR Apache-2.0) AND Unlicense AND Unicode-3.0 URL: https://github.com/oabdallat/awake Source0: %{name}-%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.gz BuildRequires: cargo BuildRequires: rust Recommends: (kdialog or zenity) %description Keeps the PC from sleeping for a set time (like PowerToys Awake), from a system tray icon or the command line. Works on KDE Plasma, GNOME (with the AppIndicator extension for the tray) and other desktops; the screen can optionally stay on too. %prep %autosetup -a1 mkdir -p .cargo cat > .cargo/config.toml << 'TOML' [source.crates-io] replace-with = "vendored" [source.vendored] directory = "vendor" TOML %build cargo build --release --locked --offline %check cargo test --release --locked --offline %install install -Dpm755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dpm644 packaging/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop install -Dpm644 assets/icons/%{name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg install -Dpm644 -t %{buildroot}%{_datadir}/icons/hicolor/scalable/status assets/icons/%{name}-{on,off}-symbolic.svg %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/icons/hicolor/scalable/status/%{name}-*-symbolic.svg