File dreamchess.spec of Package dreamchess

#
# spec file for package dreamchess
#
# Copyright (c) 2020 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:           dreamchess
Version:        0.3.0
Release:        0
Summary:        A chess game with 3D openGL graphics
License:        GPL-3.0-only
Group:          Amusements/Games/Board/Chess
URL:            https://www.dreamchess.org/
Source0:        https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-for-no-return-in-nonvoid-function.patch - gh#dreamchess/dreamchess#41
Patch0:         fix-for-no-return-in-nonvoid-function.patch
BuildRequires:  bison
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(pugixml)
BuildRequires:  pkgconfig(sdl2)

%description
DreamChess is an open source chess game. It comes with its own
engine called Dreamer. Both DreamChess and Dreamer are compatible
with the xboard/Winboard chess engine communication protocol.
This means that DreamChess can be used with other xboard-compatible
chess engines such as crafty and GNU Chess.
Similarly, the Dreamer chess engine can be used with other
xboard-compatible user interfaces such as XBoard/WinBoard.

%prep
%setup -q
%patch0 -p1

%build
%cmake  \
    -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}
%cmake_build

%install
%cmake_install

# remove LICENSE.txt file
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE.txt

%fdupes %{buildroot}%{_datadir}/%{name}

%files
%license LICENSE.txt
%doc README.md NEWS.md AUTHORS.txt
%{_bindir}/*
%{_datadir}/%{name}/
%dir %{_datadir}/icons/hicolor/48x48/apps/
%dir %{_datadir}/icons/hicolor/256x256/apps/
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man*/*

%changelog
openSUSE Build Service is sponsored by