File domino-chain.spec of Package domino-chain

#
# spec file for package domino-chain
#
# Copyright (c) 2024 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:           domino-chain
Version:        1.1
Release:        0
Summary:        Rearrange dominoes on different platforms to start a chain reaction
License:        GPL-3.0-only
Group:          Amusements/Games/Action/Arcade
URL:            https://domino-chain.gitlab.io/
Source0:        https://gitlab.com/%{name}/%{name}.gitlab.io/-/archive/%{version}/%{name}.gitlab.io-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM fix-makefile-finding-FreeSans-font.patch - patch for makefile to find FreeSans.ttf
# https://gitlab.com/domino-chain/domino-chain.gitlab.io/-/issues/16
Patch0:         fix-makefile-finding-FreeSans-font.patch
# PATCH-FIX-UPSTREAM domino-chain-fix-building-with-gcc14.patch - fix for building with gcc14
Patch1:         domino-chain-fix-building-with-gcc14.patch
BuildRequires:  ImageMagick
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnu-free-fonts
BuildRequires:  hicolor-icon-theme
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_system-devel
BuildRequires:  pkgconfig
BuildRequires:  povray
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(fribidi)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(zlib)
Requires:       gnu-free-fonts
Recommends:     %{name}-lang

%description
Domino-Chain is a puzzle game where you have to rearrange
dominoes on different platforms to start a chain reaction that
makes all dominoes topple over. There are many strange types
of dominoes, such as the Ascender which will rise to the
ceiling when pushed, or the Exploder which will blast a hole
into the platform it stands on.

Domino-Chain is a faithful reincarnation of the game Pushover
originally published by Ocean in 1992. Compared to Pushover,
Domino-Chain has some new levels, some additional domino;
types, better graphics in higher resolution and high-quality
music. On top of that, you can load and play the original
levels from Pushover if you have a copy of it.
This game is free software and created by volunteers. Even
though it is in a pretty good state, there is a lot to
improve. If you like Domino-Chain, please consider to join the
team and to help with translations, levels, graphics and more.

%lang_package

%prep
%setup -q -n %{name}.gitlab.io-%{version}
%patch -P 0 -p1
%patch -P 1 -p1

%build
%make_build

%install
%make_install

# Symlink system font to fonts data dir of domino-chain
mkdir -p %{buildroot}%{_datadir}/%{name}/fonts
ln -s %{_datadir}/fonts/truetype/FreeSans.ttf \
    %{buildroot}%{_datadir}/%{name}/fonts/FreeSans.ttf

# Move html documentation to the correct place
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/doc/%{name}/html %{buildroot}%{_docdir}/%{name}
rm -d %{buildroot}%{_datadir}/doc/%{name}

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

%find_lang %{name}     

%files
%license LICENSE
%doc AUTHORS README.md
%dir %{_docdir}/%{name}/html
%{_docdir}/%{name}/html/*
%{_bindir}/%{name}
%{_datadir}/%{name}
%exclude %{_datadir}/locale
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/%{name}.metainfo.xml
%{_mandir}/man?/%{name}.?%{?ext_man}

%files lang -f %{name}.lang 

%changelog
openSUSE Build Service is sponsored by