File ksnip.spec of Package ksnip
#
# spec file for package ksnip
#
# 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.ksnip.ksnip
Name: ksnip
Version: @SERVICE@
Release: 0
Summary: Screenshot tool
License: GPL-3.0-or-later
Group: Productivity/Graphics/Other
URL: https://github.com/DamirPorobic/ksnip
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: kf6-extra-cmake-modules
BuildRequires: pkgconfig
BuildRequires: qt6-gui-private-devel
BuildRequires: update-desktop-files
BuildRequires: xvfb-run
BuildRequires: cmake(GTest)
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
BuildRequires: cmake(kColorPicker-Qt6)
BuildRequires: cmake(kImageAnnotator-Qt6)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb-xfixes)
Recommends: %{name}-lang
%description
Ksnip is a Qt based cross-platform screenshot tool that provides many
annotation features for your screenshots.
%lang_package
%prep
%autosetup -p1
%build
%cmake_qt6 \
-DBUILD_WITH_QT6=ON \
-DBUILD_TESTS=ON
%qt6_build
%install
%qt6_install
%suse_update_desktop_file -n -r %{_name} Utility DesktopUtility
%find_lang %{name} --with-qt
%check
xvfb-run %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} --test-dir %{__builddir}/tests/ || true
%files
%doc CHANGELOG.md CODINGSTYLE.md README.md
%{_bindir}/%{name}
%{_datadir}/metainfo/%{_name}.appdata.xml
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%license LICENSE.txt
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%changelog