File nanosaur.spec of Package nanosaur

#
# spec file for package nanosaur
#
# Copyright (c) 2021, 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:           nanosaur
Version:        1.4.2
Release:        0
Summary:        Play as a cybernetic dinosaur in this third-person shooter
License:        CC-BY-SA-4.0
Group:          Amusements/Games/Action/Arcade
#Git-Clone:     https://github.com/jorio/Nanosaur.git
URL:            https://pangeasoft.net/nano/
Source:         %{name}-%{version}.tar.xz
Source1:        nanosaur-wrapper.sh
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(sdl2)

%description
Nanosaur is a 1998 Macintosh game by Pangea Software. In it,
you’re a cybernetic dinosaur from the future who’s sent back
in time 20 minutes before a giant asteroid hits the Earth.

%prep
%setup -q

%build
%cmake -DBUILD_SHARED_LIBS=OFF
%make_build

%install
install -D -m0755 build/Nanosaur %{buildroot}/%{_libexecdir}/nanosaur/nanosaur
install -D -m0755 %{SOURCE1} %{buildroot}/%{_bindir}/nanosaur
cp -arv Data/ %{buildroot}/%{_libexecdir}/nanosaur/
install -D -m0644 ./cmake/Nanosaur.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
%suse_update_desktop_file -c %{name} %{name} "A cybernetic dinosaur 3D shooter" %{name} %{name} Game ActionGame

%files
%license LICENSE.md
%doc CHANGELOG.md README.md
%{_bindir}/nanosaur
%dir %{_libexecdir}/nanosaur
%{_libexecdir}/nanosaur/nanosaur
%{_libexecdir}/nanosaur/Data/
%{_datadir}/applications/nanosaur.desktop
%{_datadir}/icons/hicolor/512x512/apps/nanosaur.png

%changelog
openSUSE Build Service is sponsored by