File hurrican.spec of Package hurrican

#
# spec file for package hurrican
#
# Copyright (c) 2023 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/
#

%define srcname Hurrican
Name:           hurrican
Version:        1.0.9.3
Release:        0
Summary:        Jump and shoot game based on the Turrican game series
License:        SUSE-Freeware
Group:          Amusements/Games/Action/Other
URL:            https://github.com/HurricanGame/Hurrican
Source0:        https://codeload.github.com/HurricanGame/Hurrican/tar.gz/refs/tags/v%{version}#/%{srcname}-%{version}.tar.gz
Source1:        hurrican.desktop
Source2:        hurrican.png
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(epoxy)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(glm)
BuildRequires:  pkgconfig(libmodplug)
BuildRequires:  pkgconfig(sdl)
Requires:       hurrican-data = %{version}

%description
Inspired by the epic Turrican game series, Hurrican stays by all means
true to the original game while still being highly innovative.

Blast your way through myriads of enemies, explore the secrets of nine
massive worlds and collect tons of powerups to increase your firepower
in this highly explosive Run and Gun arcade game.

Hurrican is THE ultimate “Turrican Mega-Mix”, taking ideas from several
installements of the original franchise while at the same time expanding
on it’s universe.

%package data
Summary:        Architecture independent data for hurrican
Group:          Amusements/Games/Action/Other
BuildArch:      noarch

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

%prep
%autosetup -p1 -n %{srcname}-%{version}

# Remove the PVR compress tool binary and script
rm -r ./Hurrican/data/textures/pvr

%build
cd Hurrican
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
%make_build TARGET=linux_GL2

%install
%suse_update_desktop_file -c hurrican hurrican "Turrican Clone" hurrican hurrican "Game;ArcadeGame;"
install -Dpm0644 %{SOURCE1} %{buildroot}%{_desktopdir}/%{name}.desktop
install -Dm0644 %{SOURCE2} %{buildroot}%{_liconsdir}/%{name}.png
mkdir -p %{buildroot}%{_datadir}/%{name}/data
mkdir -p %{buildroot}%{_datadir}/%{name}/lang
install -Dm0755 Hurrican/build/%{name} %{buildroot}%{_bindir}/%{name}
install -d %{buildroot}%{_datadir}/%{name}/data
cp -R Hurrican/data/* %{buildroot}%{_datadir}/%{name}/data/
install -d %{buildroot}%{_datadir}/%{name}/lang
cp -R Hurrican/lang/*.lng %{buildroot}%{_datadir}/%{name}/lang/

%fdupes %{buildroot}%{_datadir}/%{name}

%files
%{_bindir}/%{name}
%{_datadir}/pixmaps/hurrican.png
%{_datadir}/applications/hurrican.desktop

%files data
%dir %{_datadir}/hurrican
%{_datadir}/hurrican

%changelog
openSUSE Build Service is sponsored by