File Flash-Masta-Desktop.spec of Package Flash-Masta-Desktop
#
# spec file for package Flash-Masta-Desktop
#
# Copyright (c) 2023 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: Flash-Masta-Desktop
Version: 1.0.0
Release: 0
Summary: Desktop software for rewriteable game cartridges (NeoGeo Pocket/WonderSwan)
License: GPL-3.0-only
Group: Hardware/Other
URL: https://github.com/doccaz/Flash-Masta-Desktop
Source0: https://github.com/doccaz/Flash-Masta-Desktop/archive/refs/tags/v%{version}.tar.gz#/Flash-Masta-Desktop-%{version}.tar.gz
BuildRequires: libusb-1_0-devel
BuildRequires: qt6-base-common-devel
BuildRequires: qt6-core-devel
BuildRequires: qt6-core-private-devel
BuildRequires: qt6-gui-devel
BuildRequires: qt6-svg-devel
BuildRequires: qt6-widgets-devel
%description
This is a desktop application to write/read NeoGeo Pocket/Pocket Color and WonderSwan cartridges to
the FlashMasta cartrige (www.flashmasta.com) and clones.
%prep
%setup -q -n Flash-Masta-Desktop-%{version}
%build
mkdir build
cd build
# disabling PIE compilation as it seems to make QT6 core dump
echo "QMAKE_CXXFLAGS += -no-pie" >> ../FlashMasta.pro
echo "QMAKE_LFLAGS += -no-pie" >> ../FlashMasta.pro
qmake6 ../FlashMasta.pro
%make_build
cd ../tools
%make_build
./build-database
mv *.db ../build
%install
mkdir -p %{buildroot}%{_bindir}
install -m 0755 build/FlashMasta %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/{FlashMasta,applications}
install -m 0644 build/*.db %{buildroot}%{_datadir}/FlashMasta/.
install -m 0644 FlashMasta.desktop %{buildroot}%{_datadir}/applications/Flash-Masta-Desktop.desktop
mkdir -p %{buildroot}%{_licensedir}/%{name}
install -m 0644 LICENSE.txt %{buildroot}%{_licensedir}/%{name}/
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 0644 README.md %{buildroot}%{_docdir}/%{name}/
%files
%license LICENSE.txt
%doc README.md
%{_bindir}/FlashMasta
%dir %{_datadir}/FlashMasta
%{_datadir}/FlashMasta/*
%{_datadir}/applications/*
%changelog