File qcheckers.spec of Package qcheckers
#
# spec file for package qcheckers
#
# Copyright (c) 2021 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: qcheckers
Version: 0.9.0
Release: 0
Summary: Checkers Boardgame
License: GPL-2.0-only
Group: Amusements/Games/Board/Other
URL: https://portnov.github.io/qcheckers/
Source0: https://codeload.github.com/portnov/qcheckers/tar.gz/refs/tags/%{version}#/%{name}-%{version}.tar.gz
Source1: opensuse_theme.tar.bz2
# PATCH-FIX-UPSTREAM translations.patch -- https://github.com/portnov/qcheckers/pull/7
Patch0: translations.patch
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: libqt5-linguist
BuildRequires: libqt5-qtbase-common-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
%description
QCheckers, formely known as KCheckers,
is a is a Qt version of the classic
boardgame "checkers" ("draughts").
%prep
%setup -q
%patch0 -p1
cd themes
bzip2 -dc %{SOURCE1} | tar -xf -
%build
%qmake5 PREFIX="%{_prefix}" \
QMAKE_CFLAGS+="%{optflags}" \
QMAKE_CXXFLAGS+="%{optflags}" \
QMAKE_STRIP=""
%make_build
%install
make INSTALL_ROOT=%{buildroot} install
install -Dm 0644 icons/biglogo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%fdupes -s %{buildroot}%{_datadir}
%suse_update_desktop_file -c %{name} KCheckers "Checkers Boardgame" %{name} %{name} Game BoardGame
%files
%license COPYING
%doc AUTHORS FAQ README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%changelog