File GoOllie.spec of Package GoOllie

#
# spec file for package GoOllie
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2014 B1 Systems GmbH, Vohburg, Germany.
#
# 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:           GoOllie
Version:        1.3
Release:        0
Summary:        A funny and different platform game
License:        CC-BY-SA-3.0 AND GPL-3.0-or-later
Group:          Amusements/Games/Action/Arcade
URL:            http://www.charliedoggames.com/?page_id=62
# http://www.tweeler.com/GoOllie_1.3_src.tar.gz
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.png
# PATCH-FIX-OPENSUSE GoOllie-tuxcap-lib.patch -- Fix link library name of tuxcap
Patch0:         %{name}-tuxcap-lib.patch
# PATCH-FEATURE-UPSTREAM GoOllie-1.3-no_unneeded_libs.patch reddwarf@opensuse.org -- Avoid linking to unneeded libraries. Not reported upstream because I don't know where...
Patch1:         %{name}-1.3-no_unneeded_libs.patch
Patch2:         GoOllie-CmakeLists.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libtuxcap-devel
BuildRequires:  python-rpm-macros
BuildRequires:  python3-devel
%if %{?suse_version}
BuildRequires:  fdupes
%endif

%description
Ollie the Oligocheata is a worm on a mission
He is on a mission to bring mouse controlled platforming fun to everyone!
Go Ollie is a free Linux game with beautifully rendered scenes and animations
The latest in innovative mouse controlled platform gaming featuring a unique fusion of platform and match three gaming mechanics
Two gameplay modes:
Story Mode with over 60 individual levels each with three different objectives
Fast and furious action game with unlimited re-playability and high score table

%prep
%setup -q
%patch -P0
%patch -P1
%patch -P2 -p1

sed -i -e "s|SetAppResourceFolder.*|app.SetAppResourceFolder(\"%{_datadir}/%{name}\");|g" src/main.cpp

%build
%cmake
%cmake_build
cd ..
%{py3_compile src}

%install
install -s -D -m 0755 build/%{name} %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -a data/* %{buildroot}%{_datadir}/%{name}
cp -a src/*.py src/__pycache__ %{buildroot}%{_datadir}/%{name}
install -D %{SOURCE1} -m 0644 %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -D %{SOURCE2} %{buildroot}/%{_datadir}/pixmaps/%{name}.png
%if %{?suse_version}
%fdupes %{buildroot}%{_datadir}/%{name}
%endif

%files
%license COPYING other_licenses/
%doc README
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by