File brickemupy.spec of Package BrickEmuPy
#
# spec file for package brickemupy
#
# Copyright (c) 2024 mantarimay
#
# 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: brickemupy
Version: 0
Release: 0
Summary: Brick Game emulator
License: CC0-1.0
URL: https://github.com/azya52/BrickEmuPy
Source0: %{name}-%{version}.tar.zst
BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme
BuildRequires: fdupes
BuildRequires: unzip
Requires: python3-PyQt6
Requires: xdg-desktop-portal-kde6
BuildArch: noarch
%description
Brick Game emulator in Python with PyQt6.
%prep
%autosetup -p1
%build
%install
install -d "%{buildroot}%{_datadir}/%{name}/"
cp -r assets *.py cores ui %{buildroot}%{_datadir}/%{name}
install -Dm0644 ui/icon.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/BrickEmuPy.svg
install -d "%{buildroot}%{_datadir}/applications/"
cat > "%{buildroot}%{_datadir}/applications/BrickEmuPy.desktop" << _EOD
[Desktop Entry]
Type=Application
Name=BrickEmuPy
GenericName=BrickEmuPy
Comment=Brick Game emulator
Exec=env XDG_CURRENT_DESKTOP=KDE python3 %{_datadir}/%{name}/main.py
Icon=BrickEmuPy
Terminal=false
StartupNotify=false
Categories=Utility;
_EOD
%fdupes %{buildroot}%{_datadir}
%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/BrickEmuPy.desktop
%files
%license LICENSE
%doc README.md
%{_datadir}/%{name}
%{_datadir}/applications
%{_datadir}/icons/hicolor
%changelog