File jumpnbump.spec of Package jumpnbump

#
# spec file for package jumpnbump
#
# Copyright (c) 2022 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:           jumpnbump
Version:        1.61
Release:        0
Summary:        Funny Game with Cute Little Bunnies
License:        GPL-2.0-or-later
Group:          Amusements/Games/Action/Arcade
URL:            https://libregamewiki.org/Jump_n_Bump
Source0:        https://gitlab.com/LibreGames/jumpnbump/-/archive/%{version}/%{name}-%{version}.tar.bz2
Source1:        jumpnbump-levels-0.0.20020825_selected.tar.bz2
Patch0:         jumpnbump-1.50-Exit-fullscreen-mode-when-you-quit.diff
Patch1:         jumpnbump-1.50-exit-fullscreen-mode-early-to-avoid-crash.diff
Patch2:         jumpnbump_menu-default.diff
Patch3:         jumpnbump-1.61-extern_globals.patch
# Needed for typelib() Requires
BuildRequires:  gobject-introspection-devel
BuildRequires:  SDL2-devel
BuildRequires:  SDL2_mixer-devel
BuildRequires:  SDL2_net-devel
BuildRequires:  libbz2-devel
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
Requires:       ImageMagick
Requires:       python3-gobject-Gdk

%description
You are a cute little bunny and you have to avoid the other bunnies
trying to stomp on you and at the same time try to stomp on as many
opponents as possible. Jump & bump is multiplayer game only with up to
four players simultaneously. Gather the local crew and have a blast.

%lang_package

%prep
%autosetup -p1 -a 1
sed -i 's|#!/usr/bin/env python3|#!/usr/bin/python3|' menu/jumpnbump_menu.py.pre

%build
export CFLAGS="%{optflags}"
%make_build \
    PREFIX=%{_prefix}
%make_build \
    PREFIX=%{_prefix} \
    -C menu

%install
%make_install \
    PREFIX=%{_prefix}
%make_install \
    PREFIX=%{_prefix} \
    -C menu

install -D -m 644 -t %{buildroot}%{_datadir}/pixmaps sdl/*.xpm

cd jumpnbump-levels-*
for i in *.dat.bz2; do
    bunzip2 < "$i" > %{buildroot}%{_datadir}/jumpnbump/"${i%%.bz2}"
done
cd ..

%suse_update_desktop_file %{name}
%find_lang %{name} --all-name

%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog README.md docs/LINKS docs/gob.txt docs/levelmaking
%{_bindir}/jumpnbump-menu
%{_bindir}/jumpnbump
%{_bindir}/gobpack
%{_bindir}/jnbpack
%{_bindir}/jnbunpack
%{_datadir}/icons/*
%{_datadir}/jumpnbump/
%{_datadir}/pixmaps/*
%{_datadir}/metainfo/*
%{_mandir}/man6/*
%{_datadir}/applications/*

%changelog
openSUSE Build Service is sponsored by