File 86Box.spec of Package 86Box

#
# spec file for package 86Box
#
# Copyright (c) 2022 SUSE LLC
#
# 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:           86Box
Version:        4.1.1
Release:        0
Summary:        Emulator of x86-based machines based on PCem
License:        GPL-2.0-or-later
URL:            https://86box.net/
Source0:        https://github.com/86Box/86Box/archive/refs/tags/v%{version}.tar.gz
BuildRequires:  pkg-config
BuildRequires:  gcc-c++
BuildRequires:  cmake >= 3.21
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(rtmidi)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(slirp)
BuildRequires:  pkgconfig(fluidsynth)
BuildRequires:  qt6-base-devel
BuildRequires:  qt6-base-private-devel
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6OpenGL)
BuildRequires:  pkgconfig(vulkan)
BuildRequires:  pkgconfig(libevdev)
BuildRequires:  pkgconfig(xi)
BuildRequires:  extra-cmake-modules
BuildRequires:  update-desktop-files
Recommends:     fluid-soundfont-gm
Recommends:		fluidsynth
Recommends:		ghostscript

%description
Emulator of x86-based machines based on PCem

%debug_package

%prep
%setup -q

%build
%cmake_qt6 \
	-DRELEASE=on \
	-DUSE_QT6=on \
    -DNEW_DYNAREC=OFF \
	-DDISCORD=off \
	-DCMAKE_CXX_FLAGS=-march=x86-64-v3 \
	-DCMAKE_C_FLAGS=-march=x86-64-v3
%qt6_build

%install
%qt6_install

# Icons
for i in 48 64 72 96 128 192 256 512; do
    install -Dpm 0644 src/unix/assets/${i}x${i}/net.86box.86Box.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done
# Desktop file
mkdir -p %{buildroot}%{_datadir}/applications
install -Dpm 0644 src/unix/assets/net.86box.86Box.desktop %{buildroot}%{_datadir}/applications/net.86box.86Box.desktop
%suse_update_desktop_file -r net.86box.86Box Emulator

%files
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/net.86box.86Box.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%changelog
openSUSE Build Service is sponsored by