File m64py.spec of Package m64py

#
# spec file for package m64py
#
# Copyright (c) 2025 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:           m64py
Version:        0.3.0
Release:        0
Summary:        A frontend for Mupen64Plus
License:        GPL-3.0-only
Group:          System/Emulators/Other
URL:            https://m64py.sourceforge.net/
Source:         https://github.com/mupen64plus/mupen64plus-ui-python/releases/download/%{version}/m64py-%{version}-bundle.tar.gz
BuildRequires:  %{python_module PyQt6 >= 6.1}
BuildRequires:  %{python_module PyQt6}
BuildRequires:  %{python_module sip-devel >= 6.0.2}
BuildRequires:  fdupes
BuildRequires:  python3-PyQt6
BuildRequires:  python3-PyQt6-devel
BuildRequires:  python3-setuptools
BuildRequires:  qt6-base-common-devel
BuildRequires:  qt6-base-devel
BuildRequires:  qt6-base-private-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt6Designer) >= %{qt6_version}
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6Widgets) >= %{qt6_version}
Requires:       libmupen64plus2 >= 2.0
Requires:       mupen64plus-plugin-audio
Requires:       mupen64plus-plugin-input
Requires:       mupen64plus-plugin-rsp
Requires:       mupen64plus-plugin-video
Requires:       python3-PyQt6
Requires:       python3-PySDL2
Requires(post): hicolor-icon-theme
Requires(postun): hicolor-icon-theme
Provides:       mupen64plus-ui
BuildArch:      noarch

%description
M64Py is a Qt6 front-end (GUI) for Mupen64Plus 2.0, a cross-platform plugin-based Nintendo 64 emulator.
Front-end is written in Python and it provides a user-friendly interface over Mupen64Plus shared library.

%prep
%autosetup

%build
export PATH=$PATH:%{_libexecdir}/qt6
%python3_build

%install
%python3_install -O1

# fdupes
%fdupes %{buildroot}%{python3_sitelib}/%{name}/
%fdupes %{buildroot}%{_datadir}/icons/hicolor/256x256/

%files
%license COPYING
%doc AUTHORS CHANGELOG LICENSES PKG-INFO README.rst
%{python3_sitelib}/m64py
%{python3_sitelib}/m64py-%{version}*-info
%{_bindir}/m64py
%{_datadir}/applications/net.sourceforge.m64py.M64Py.desktop
%{_datadir}/icons/hicolor/256x256/apps/net.sourceforge.m64py.M64Py.png
%{_datadir}/metainfo/net.sourceforge.m64py.M64Py.metainfo.xml

%changelog
openSUSE Build Service is sponsored by