File sudoku-cpp.spec of Package sudoku-cpp

#
# spec file for package sudoku-cpp
#
# Copyright (c) 2026 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  sudoku
%define _appid  org.sudoku_cpp.Sudoku
Name:           sudoku-cpp
Version:        @SERVICE@
Release:        0
Summary:        Offline Sudoku game
License:        GPL-3.0-or-later
Group:          Amusements/Games/Board/Puzzle
URL:            https://github.com/darkstar79/sudoku-cpp
Source0:        %{name}-%{version}.tar.xz
Source1:        ru.yaml
BuildRequires:  appstream-glib
BuildRequires:  cmake >= 3.28
#uildRequires:  conan >= 2.18.1
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  cmake(Qt6Test)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  pkgconfig(catch2)
BuildRequires:  pkgconfig(fmt)
BuildRequires:  pkgconfig(libsodium)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(spdlog)
BuildRequires:  pkgconfig(yaml-cpp)
BuildRequires:  pkgconfig(zlib)
ExclusiveArch:  %{ix86} x86_64

%description
An offline Sudoku game built with C++23 and Qt6 for desktop users who
prefer keyboard navigation and offline-only operation.

%prep
%autosetup -p1
cp %{SOURCE1} resources/locales/

%build
#conan install . --build=missing
%cmake_qt6 \
    -DENABLE_SANITIZERS=OFF \
    -DSUDOKU_ENABLE_UI_TESTS=OFF \
    -DCMAKE_SKIP_RPATH=ON
%qt6_build

%install
%qt6_install

%check
#./build/bin/tests/unit_tests
#./build/bin/tests/integration_tests
QT_QPA_PLATFORM=offscreen %ctest --test-dir ./tests ||:
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{_appid}.metainfo.xml
desktop-file-validate --no-hints %{buildroot}%{_datadir}/applications/%{_appid}.desktop

%files
%doc README.md
%{_bindir}/%{_name}
%dir %{_datadir}/%{_name}
%dir %{_datadir}/%{_name}/locales
%{_datadir}/%{_name}/locales/*.yaml
%{_datadir}/applications/%{_appid}.desktop
%{_datadir}/icons/hicolor/*/apps/%{_appid}.??g
%{_datadir}/metainfo/%{_appid}.metainfo.xml
%license LICENSE

%changelog
openSUSE Build Service is sponsored by