File swayshot.spec of Package swayshot

#
# spec file for package swayshot
#
# Copyright (c) 2021 SUSE LLC
#
# 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/
#


Name:           swayshot
Version:        2.6.0
Release:        0
Summary:        Screenshot helper for sway
License:        GPL-3.0-or-later
Group:          System/X11/Utilities
URL:            https://gitlab.com/radio_rogal/swayshot
Source:         https://gitlab.com/radio_rogal/swayshot/-/archive/%{version}/swayshot-%{version}.tar.gz
BuildArch:      noarch
Requires:       sway
Requires:       xdg-user-dirs
Requires:       grim
Requires:       jq
Requires:       slurp
Recommends:     wl-clipboard

%description
A screenshot helper for sway. It adds keyboard shortcuts to take screenshot:
 * `Print Scr` made screenshot for whole screen
 * `Alt` + `Print Scr` made screenshot for a focused window
 * `Shift` + `Print Scr` made screenshot for a selected region
 * `Super` + `Print Scr` made screenshot for whole screen then upload it to x0.at
 * `Super` + `Alt` + `Print Scr` made screenshot for a focused window then upload it to x0.at
 * `Super` + `Shift` + `Print Scr` made screenshot for a selected region then upload it to x0.at

%prep
%setup -q

%build

%install
chmod +x swayshot.sh
mkdir -p %{buildroot}%{_bindir}/
cp swayshot.sh %{buildroot}%{_bindir}/swayshot
mkdir -p %{buildroot}%{_sysconfdir}/sway/config.d/
cp swayshot.conf %{buildroot}%{_sysconfdir}/sway/config.d/60-swayshot.conf

%files
%{_bindir}/swayshot
%dir %{_sysconfdir}/sway
%dir %{_sysconfdir}/sway/config.d
%config %{_sysconfdir}/sway/config.d/60-swayshot.conf
%license license notice
%doc changelog.md readme.md

%changelog

openSUSE Build Service is sponsored by