File cutechess.spec of Package cutechess
#
# spec file for package cutechess
#
# Copyright (c) 2023 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: cutechess
Version: @SERVICE@
Release: 0
Summary: For playing chess
License: GPL-3.0-or-later AND MIT
Group: Amusements/Games/Board/Chess
URL: https://github.com/cutechess/cutechess
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.16.0
#uildRequires: cmake(Qt6LinguistTools)
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Core5Compat)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
Recommends: sloppy022
Suggests: stockfish
%description
Cute Chess is a graphical user interface, command-line interface and a
library for playing chess. Cute Chess is written in C++ using the Qt
framework.
%package doc
Summary: Documentation for %{name}
Group: Documentation/Other
BuildRequires: doxygen
BuildRequires: fdupes
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Doxygen generated documentations for %{name}.
%prep
%autosetup
sed -i '/icons\/application/s/application/hicolor/' CMakeLists.txt
%build
pushd ./docs/api/
doxygen -g api.doxygen
doxygen api.doxygen
popd
%cmake_qt6
%{qt6_build}
%install
%{qt6_install}
install -dm 0755 %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
cp -a docs/api/html %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
%fdupes -s %{buildroot}%{_docdir}/%{name}-%{version}-doxygen/
%check
%ctest
%files
%doc AUTHORS CHANGELOG.md README.md TODO
%{_bindir}/%{name}*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_mandir}/man?/%{name}-*.?%{?ext_man}
%license COPYING
%files doc
%{_docdir}/%{name}-%{version}-doxygen/
%changelog