A new user interface for you!

File knights.spec of Package knights

# spec file for package knights
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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/

%bcond_without lang
Name:           knights
Version:        18.12.0
Release:        0
Summary:        A simple chess board
License:        GPL-2.0-or-later
Group:          Amusements/Games/Board/Chess
URL:            http://www.kde.org
Source:         https://download.kde.org/stable/applications/%{version}/src/%{name}-%{version}.tar.xz
BuildRequires:  extra-cmake-modules
BuildRequires:  cmake(KF5ConfigWidgets)
BuildRequires:  cmake(KF5Crash)
BuildRequires:  cmake(KF5DBusAddons)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5KDEGames)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5Plasma)
BuildRequires:  cmake(KF5Plotting)
BuildRequires:  cmake(KF5TextWidgets)
BuildRequires:  cmake(KF5Wallet)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  cmake(Qt5Concurrent)
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Svg)
BuildRequires:  cmake(Qt5TextToSpeech)
BuildRequires:  cmake(Qt5Widgets)
Requires:       gnuchess
Recommends:     %{name}-lang
Suggests:       crafty
Obsoletes:      kchess
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%if 0%{?suse_version} < 1500
BuildRequires:  gcc7-c++

Knights is KDE's chess frontend. It supports playing local games against
human players or against chess engines (XBoard and UIC),
as well as playing online games on FICS server.
Furthermore, it is possible to watch two different chess engines playing
against each other.


%setup -q

%if 0%{?suse_version} < 1500
# gcc 4.8.5 is too old
export CC=gcc-7
export CXX=g++-7
%cmake_kf5 -d build

%kf5_makeinstall -C build

%if 0%{?suse_version}
%suse_update_desktop_file -r org.kde.knights Qt KDE Game BoardGame

%if %{with lang}
%find_lang %{name}

%license LICENSE
%doc README.themes
%dir %{_kf5_configkcfgdir}
%doc %{_kf5_htmldir}/en/knights/

%if %{with lang}
%files lang -f %{name}.lang