File freenukum.spec of Package freenukum

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


Name:           freenukum
Version:        0.3.5
Release:        0
Summary:        Clone of the original Duke Nukum 1 Jump'n Run game
License:        AGPL-3.0
Group:          Amusements/Games/Action/Arcade
URL:            https://gitlab.com/silwol/freenukum/
Source0:        freenukum-%{version}.tar.xz
Source1:        vendor.tar.xz
Source2:        cargo_config
BuildRequires:  cargo-packaging
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(sdl2)

%description
The Freenukum Jump'n Run game is a clone of the old EGA graphics based
2D game Duke Nukem.

You need the original Duke Nukem level and graphics files to play the
game.

%prep
%autosetup -a1
mkdir .cargo
cp %{SOURCE2} .cargo/config

%build
%{cargo_build}

%install
%{cargo_install}
install -Dm 0644 doc/freenukum.6 %{buildroot}%{_mandir}/man6/freenukum.6
install -Dm 0644 data/icons/scalable/freenukum.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -Dm 0644 freenukum.desktop.in %{buildroot}%{_datadir}/applications/%{name}.desktop

%files
%doc AUTHORS README.md CHANGELOG.md
%license COPYING
%{_bindir}/%{name}
%{_bindir}/%{name}-data-tool
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man6/%{name}.6%{?ext_man}
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%changelog
openSUSE Build Service is sponsored by