File OpenSolomonsKey.spec of Package OpenSolomonsKey
#
# spec file for package OpenSolomonsKey
#
# Copyright (c) 2022, 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: OpenSolomonsKey
Version: 0~git20200830
Release: 0
Summary: Game engine for Solomon's Key
License: Unlicense
Group: Amusements/Games/Action/Arcade
URL: https://mdodis.itch.io/open-solomons-key
#Git-Clone: https://github.com/mdodis/OpenSolomonsKey
Source: %{name}-%{version}.tar.xz
Patch0: x.patch
BuildRequires: Mesa-libGLESv3-devel
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(glm)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(sdl2)
### really ???
# for libudev
BuildRequires: systemd-devel
### /really ???
%description
Open Solomon's Key is an open-source remake of the 1986 arcade game
by Tecmo. It tries to be truthful to the original game (as much as
anyone can without the original source code), while adding some
extra elements, like a fully customizable level format.
This package only includes the binary files. You still need the
data files from the original game.
These files can also be downloaded from
https://mdodis.itch.io/open-solomons-key/
### run the game from within the game-data-folder
# cd ~/Downloads/osk-2020-06-17/dist/
# /usr/bin/solomons_key
# /usr/bin/sdl_solomons_key
%prep
%setup -q
%patch0 -p1
%build
### SDL
#Release
# broken
#g++ -DNDEBUG -I./src/../ src/sdl_OpenSolomonsKey.cpp $(pkg-config --cflags --libs alsa glu sdl2) -o sdl_solomons_key
# broken
g++ -fPIE -pthread -fcommon -Wno-write-strings -I./src/../ -O3 -DNDEBUG src/sdl_OpenSolomonsKey.cpp -I/usr/include/SDL2 -D_REENTRANT -lSDL2 -ludev -lGL -lGLU -lasound -o sdl_solomons_key
### SDL via script
#mkdir build
#chmod +x build_sdl.sh
#./build_sdl.sh
### non-SDL
g++ -fPIE -pthread -Wno-write-strings -I./src/../ -Wno-unused-result -g -ggdb -O0 src/x11_OpenSolomonsKey.cpp -lGL -lGLU -lGLX -lX11 -lasound -o solomons_key
### non-SDL via script
#mkdir build
#chmod +x build.sh
#./build.sh
%install
install -D -m0755 sdl_solomons_key %{buildroot}/%{_bindir}/sdl_solomons_key
install -D -m0755 solomons_key %{buildroot}/%{_bindir}/solomons_key
## install via script
#install -D -m0755 build/sdl_solomons_key %{buildroot}/%{_bindir}/sdl_solomons_key
#install -D -m0755 build/_solomons_key %{buildroot}/%{_bindir}/solomons_key
%files
%license LICENSE
%doc README.md
%{_bindir}/sdl_solomons_key
%{_bindir}/solomons_key
%changelog