File lzwolf.spec of Package lzwolf
#
# spec file for package lzwolf
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2021-2024, 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:           lzwolf
Version:        1.3.99999+git20210124
Release:        0
Summary:        Advanced Wolfenstein 3D source port
License:        GPL-2.0-only
Group:          Amusements/Games/3D/Shoot
URL:            https://beta.wolf3d.net/engines/LZWolf
#Git-Clone:     https://bitbucket.org/linuxwolf6/lzwolf.git
Source:         %{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE: lzwolf-use-correct-binary-path.patch
# We don't use /bin/games/foo but /usr/bin/foo for binaries
Patch0:         lzwolf-use-correct-binary-path.patch
Patch1:         lzwolf-fix-gcc14.patch
Patch2:         lzwolf-fix-sdl-linking.patch
Patch3:         lzwolf-no-rpath.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libjpeg-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_net)
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(fluidsynth)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(zlib)
Provides:       bundled(eigen)
Provides:       bundled(gdtoa)
Provides:       bundled(lzma)
%description
LZWolf is a fork of ECWolf (a Wolfenstein 3D engine based of
Wolf4SDL) created to enable developers to easily create even more
adventurous mods and games.
%prep
%autosetup -p1
# remove bundled libs
rm -Rf deps/{bzip2,zlib,jpeg-6b,SDL,SDL_mixer,SDL_net,textscreen}
%build
%cmake \
  -DBUILD_SHARED_LIBS=OFF \
  -DGPL=ON \
  -DINTERNAL_ZLIB=OFF \
  -DINTERNAL_BZIP2=OFF \
  -DINTERNAL_JPEG=OFF
%cmake_build
%install
%cmake_install
%suse_update_desktop_file -r %{name} Game ActionGame
%files
%license docs/copyright docs/license-gpl.txt docs/license-id.txt
%doc README.md docs/changelog
%{_bindir}/lzwolf
%exclude %{_datadir}/doc/lzwolf/changelog.gz
%exclude %{_datadir}/doc/lzwolf/copyright
%{_datadir}/applications/lzwolf.desktop
%{_datadir}/icons/hicolor/scalable/apps/lzwolf.svg
%dir %{_datadir}/lzwolf
%{_datadir}/lzwolf/lzwolf.pk3
%{_mandir}/man6/lzwolf.6%{?ext_man}
%changelog