File hase.spec of Package hase

#
# spec file for package hase
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 http://bugs.opensuse.org/
#


Name:           hase
Version:        1.6.6+git.20201006.31d6840
Release:        0
Summary:        Gravity artillery shooter game
License:        GPL-2.0-or-later
Group:          Amusements/Games/Strategy/Turn Based
URL:            http://ziz.gp2x.de/hase/
Source:         %{name}-%{version}.tar
Patch0:         hase-obey-cflags.patch
Patch1:         hase-fix-sparrow3d-linking.patch
BuildRequires:  pkgconfig
BuildRequires:  sparrow3d-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(SDL_net)
BuildRequires:  pkgconfig(SDL_ttf)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(zlib)
Requires:       hase-data = %{version}

%description
Hase is an open source gravity based artillery shooter. It is similar
to Worms, Hedgewars or artillery, but the gravity force and direction
depends on the mass nearby. It is optimized for mobile game consoles
like the GP2X, Open Pandora or GCW Zero, so it doesn't make use of the
mouse even on the PC. Hase features:

 * Awesome mix of real time and turn based action
 * 20 unique weapons
 * Arbitrary number of characters per team
 * Hotseat play with an arbitrary count of players
 * Also network play, even mixed with hotseat play
 * 25 different spritesets to choose your character from
 * Masses of particles, which are also influenced by gravity
 * An action point based system to use stronger or more weapons per turn
 * Different randomly dropped items to spice things up
 * Forgot the button mapping? Just activate the ingame overlay help

%package data
Summary:        Architecture independent data for hase
Group:          Amusements/Games/Strategy/Turn Based
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data
This package contains the game data for hase.
It is required to play the game.

%prep
%autosetup -p1

%build
export CFLAGS='%{optflags} -Wno-return-type'
make PARAMETER="-DDATA_FOLDER=\"\\\"%{_datadir}/hase\\\"\"" NO_DEBUG=1 %{?_smp_mflags}

%install
install -d %{buildroot}/%{_bindir}
install -m0755 hase %{buildroot}/%{_bindir}/hase
#
install -d %{buildroot}/%{_datadir}/hase
cp -r data %{buildroot}/%{_datadir}/hase
cp -r textures %{buildroot}/%{_datadir}/hase
cp -r sprites %{buildroot}/%{_datadir}/hase
cp -r sounds %{buildroot}/%{_datadir}/hase
#
install -Dm0644 hase.png %{buildroot}/%{_datadir}/pixmaps/hase.png
install -Dm0644 hase.desktop %{buildroot}/%{_datadir}/applications/hase.desktop
%suse_update_desktop_file -r hase Game StrategyGame

%if 0%{?suse_version} < 1330
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%files
%doc hase_readme.txt
%license LICENSE
%{_bindir}/hase
%{_datadir}/pixmaps/hase.png
%{_datadir}/applications/hase.desktop

%files data
%{_datadir}/hase

%changelog
openSUSE Build Service is sponsored by