File flameshot.spec of Package flameshot
#
# spec file for package flameshot
#
# Copyright (c) 2025 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/
#
%define _name org.flameshot.Flameshot
%define _ver 3.0.0-3-g45276e1
Name: flameshot
Version: @SERVICE@
Release: 0
Summary: Powerful yet simple to use screenshot software
License: GPL-3.0-or-later
Group: Productivity/Graphics/Other
URL: https://github.com/flameshot-org/flameshot
Source0: %{name}-%{version}.tar.xz
# git clone https://gitlab.com/mattbas/Qt-Color-Widgets.git && cd Qt-Color-Widgets
# git archive --format tar --prefix external/Qt-Color-Widgets/ HEAD | xz > ../Qt-Color-Widgets-`git describe --tags`.tar.xz
Source1: Qt-Color-Widgets-%{_ver}.tar.xz
Patch0: find-package-kdsingleapplication.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: cmake(KDSingleApplication-qt6)
BuildRequires: cmake(KF6GuiAddons)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6Widgets)
Recommends: %{name}-lang
Provides: bundled(libQtColorWidgets)
%description
Flameshot is a free and open-source, cross-platform tool to take
screenshots with many built-in features to save you time.
Features
* Customizable appearance.
* Easy to use.
* In-app screenshot editing.
* DBus interface.
* Upload to Imgur.
%lang_package
%package bash-completion
Summary: Bash completion for %{name}
Group: System/Shells
Requires: bash-completion
Supplements: (%{name} and bash)
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}.
%package fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Requires: fish
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
Fish command line completion support for %{name}.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: zsh
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
ZSH command line completion support for %{name}.
%prep
%autosetup -p1 -a1
%build
%cmake_qt6 \
-DDISABLE_UPDATE_CHECKER=ON \
-DUSE_WAYLAND_CLIPBOARD=ON \
-DENABLE_IMGUR=ON
%qt6_build
%install
%qt6_install
%suse_update_desktop_file -n -r %{_name} Utility DesktopUtility
%fdupes -s %{buildroot}%{_datadir}/icons/hicolor
%find_lang Internationalization %{name}.lang --with-qt
%files
%doc README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/dbus-1/interfaces/%{_name}.xml
%{_datadir}/dbus-1/services/%{_name}.service
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/icons/hicolor/*/apps/%{_name}.??g
%{_datadir}/metainfo/%{_name}.metainfo.xml
%{_mandir}/man?/%{name}.?%{?ext_man}
%license LICENSE
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%files bash-completion
%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/%{name}
%files fish-completion
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files zsh-completion
%dir %{_datadir}/zsh/
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
%changelog