File satty.spec of Package satty
#
# spec file for package satty
#
# Copyright (c) 2025 mantarimay
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_with test
Name: satty
Version: 0.20.0
Release: 0
Summary: A screenshot annotation tool inspired by Swappy and Flameshot
License: MPL-2.0
URL: https://github.com/gabm/satty
Source0: %{url}/archive/v%{version}/Satty-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: libepoxy-devel
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(libadwaita-1)
%description
Satty has been created to provide the following improvements over existing
screenshot annotation tools:
* very simple and easy to understand toolset (like Swappy)
* fullscreen annotation mode and post shot cropping (like Flameshot)
* extremely smooth rendering thanks to HW acceleration (OpenGL)
* working on wlroots based compositors (Sway, Hyprland, River, ...)
* minimal, modern looking UI, thanks to GTK and Adwaita
* be a playground for new features (post window selection, post paint
editing, ...)
%prep
%autosetup -n Satty-%{version} -a1 -p1
%build
%{cargo_build}
%install
install -Dm755 target/release/%{name} -t %{buildroot}%{_bindir}
install -Dm644 completions/%{name}.bash -t \
%{buildroot}%{_datadir}/bash-completion/completions
install -Dm644 completions/%{name}.fish -t \
%{buildroot}%{_datadir}/fish/vendor_completions.d
install -Dm644 completions/_%{name} -t \
%{buildroot}%{_datadir}/zsh/site-functions
install -Dm644 %{name}.desktop -t %{buildroot}%{_datadir}/applications
install -Dm644 assets/%{name}.svg -t \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps
%if %{with test}
%check
%{cargo_test}
%endif
%files
%license LICEN*
%doc README*
%{_bindir}/%{name}
%{_datadir}/bash-completion/completions
%{_datadir}/fish
%{_datadir}/zsh
%{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/applications
%changelog