File m64py.spec of Package m64py
#
# spec file for package m64py
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: m64py
Version: 0.2.4
Release: 0
Summary: A frontend for Mupen64Plus
License: GPL-3.0
Group: System/Emulators/Other
Url: http://m64py.sourceforge.net/
#Source: http://sourceforge.net/projects/%{name}/files/%{name}-%{version}/%{name}-%{version}.tar.gz
Source: https://github.com/mupen64plus/mupen64plus-ui-python/releases/download/%{version}/m64py-%{version}.tar.gz
# PATCH-FIX-OPENSUSE m64py-0.2.4_xdg.patch -- use correct paths for icons
Patch0: m64py-0.2.4_xdg.patch
BuildArch: noarch
BuildRequires: fdupes
BuildRequires: libSDL2-devel
BuildRequires: hicolor-icon-theme
BuildRequires: python-qt5-devel
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: python-qt5
Requires: python-PySDL2
Requires: libmupen64plus2 >= 2.0
Requires: mupen64plus-plugin-audio
Requires: mupen64plus-plugin-input
Requires: mupen64plus-plugin-rsp
Requires: mupen64plus-plugin-video
Requires(post): hicolor-icon-theme
Requires(postun): hicolor-icon-theme
Provides: mupen64plus-ui
%description
M64Py is a Qt5 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
%setup -q
# remove shebang from non-executable scripts
#for i in src/m64py/SDL/*.py; do
# sed -i '1{\@^#!/usr/bin/env python@d}' $i
#done
%patch0 -p0
%build
python3 setup.py build
%install
python3 setup.py install -O1 --root=%{buildroot} --prefix=%{_prefix} --record=INSTALLED_FILES
# Use correct category in desktop file
%suse_update_desktop_file -r %{name} "System;Emulator"
# fdupes
%fdupes %{buildroot}%{python3_sitelib}/%{name}/
%fdupes %{buildroot}%{_datadir}/icons/hicolor/
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING LICENSES PKG-INFO README.md
%dir %{python_sitelib}/%{name}
%dir %{python_sitelib}/%{name}/core
%dir %{python_sitelib}/%{name}/frontend
%dir %{python_sitelib}/%{name}/ui