File chroma.spec of Package chroma
#
# spec file for package chroma
#
# Copyright (c) 2023 SUSE LLC
# Copyright Vincent Petry <PVince81@yahoo.fr>
#
# 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: chroma
Version: 1.20
Release: 0
Summary: Abstract puzzle game with complex patterns of colourful shapes
License: GPL-2.0-only
Group: Amusements/Games/Action/Arcade
URL: http://www.level7.org.uk/chroma/
Source: http://www.level7.org.uk/chroma/download/%{name}-%{version}.tar.bz2
Source1: %{name}-curses.png
Source2: %{name}-curses.desktop
Source3: %{name}.png
Source4: %{name}.desktop
Source5: ru_RU.po
# PATCH-FIX-OPENSUSE -- Fix installation permissions of scripts
Patch0: %{name}-permissions.patch
# PATCH-FIX -- Using ncursesw with unicode wide characters
Patch1: %{name}-curses-wide-characters.patch
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: automake
BuildRequires: freetype2-devel
BuildRequires: gettext-tools
BuildRequires: ncurses-devel
Requires: %{name}-common
%description
Chroma is an abstract puzzle game. A variety of colourful shapes are
arranged in a series of increasingly complex patterns, forming fiendish
traps that must be disarmed and mysterious puzzles that must be manipulated
in order to give up their subtle secrets. Initially so straightforward that
anyone can pick it up and begin to play, yet gradually becoming difficult
enough to tax even the brightest of minds.
It's features:
* twenty one levels, ranging from beginner to expert
* infinite undo and redo capability, as well as replay of solutions
* a choice of smooth graphics or a minimal, text based version
* a level editor to allow you to design your own puzzles
* released under an open source licence, free to play
Have you got what it takes to solve Chroma?
%package curses
Summary: Chroma -- Console Version
Group: Amusements/Games/Action/Arcade
Requires: %{name}-common
%description curses
Chroma is an abstract puzzle game. Console version.
%package common
Summary: Chroma -- Common Files
Group: Amusements/Games/Action/Arcade
Suggests: %{name}
Suggests: %{name}-curses
BuildArch: noarch
%description common
This package holds the shared files.
%prep
%autosetup -p1
%build
%configure
%make_build
mkdir -p locale/ru_RU/LC_MESSAGES/
msgfmt -c -v -o locale/ru_RU/LC_MESSAGES/chroma.mo %{SOURCE5}
%install
%make_install
install -m 755 -D -d %{buildroot}%{_datadir}/pixmaps/
install -m 755 -D -d %{buildroot}%{_datadir}/applications/
install -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/
install -m 644 -D %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/
install -m 644 -D %{SOURCE2} %{buildroot}%{_datadir}/applications/
install -m 644 -D %{SOURCE4} %{buildroot}%{_datadir}/applications/
%find_lang %{name}
%files
%license COPYING
%doc README CHANGELOG
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/graphics/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%files curses
%{_bindir}/%{name}-curses
%{_datadir}/applications/%{name}-curses.desktop
%{_datadir}/pixmaps/%{name}-curses.png
%files common -f %{name}.lang
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/colours/
%{_datadir}/%{name}/help/
%{_datadir}/%{name}/levels/
%{_datadir}/%{name}/locale/
%changelog