File 3Guys.spec of Package 3Guys
#
# spec file for package 3Guys
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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: 3Guys
Version: 0.0.0+git.20180717
Release: 0
Summary: A 2D puzzle game
License: GPL-3.0-only
Group: Amusements/Games/Strategy/Other
URL: https://parallelrealities.co.uk/games/threeGuys/
#Git-Clone: https://github.com/stephenjsweeney/3Guys.git
#Source: https://github.com/stephenjsweeney/%%{name}/archive/v%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz
Source: %{name}-%{version}.tar.xz
Source1: https://parallelrealities.co.uk/downloads/3Guys/3Guys-demo-data.tar.gz
Source2: %{name}-wrapper.sh
Patch0: 3Guys-nowerror.patch
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(SDL2_ttf)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
Requires: %{name}-data = %{version}
%description
The game involves a ridiculous plot about a Red Guy who is hungry and is
looking for diamond to have for lunch. He has requested help from his
friends: Green Guy and Yellow Guy. Together, they will solve puzzles,
avoid deadly hazards, and collect keys and push blocks around to help
sate their hunger for shiny rocks.
This is a mouse-driven game and doesn't rely on twitch reflexes, so you
can take your time over solving the levels.
There are 100 levels in total, each trickier than the last.
%package data
Summary: Architecture independent data for the game 3Guys
Group: Amusements/Games/Strategy/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description data
This package contains the game data for for the game 3Guys
It is required to play the game.
%package data-demo
Summary: Demo game data for the game 3Guys
Group: Amusements/Games/Strategy/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description data-demo
This package contains the demo game data the game 3Guys.
You can only play the first 10 levels.
%prep
%setup -q -a1
%patch -P 0 -p1
%build
export CFLAGS='%{optflags}'
%make_build DATA_DIR=%{_datadir}/%{name}
%install
make install DESTDIR=%{buildroot} DATA_DIR=%{_datadir}/%{name}
install -d %{buildroot}/%{_libexecdir}/%{name}
mv %{buildroot}%{_bindir}/%{name} %{buildroot}/%{_libexecdir}/%{name}/%{name}
install -Dm0755 %{SOURCE2} %{buildroot}/%{_bindir}/%{name}
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/%{name}.desktop Game LogicGame
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%files data
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/gfx
%{_datadir}/%{name}/music
%{_datadir}/%{name}/sound
%{_datadir}/%{name}/fonts
%files data-demo
%{_datadir}/%{name}/data
%changelog