File hatari.spec of Package hatari
#
# spec file for package hatari
#
# Copyright (c) 2053 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: hatari
Version: 2.6.1
Release: 0
Summary: An Atari ST emulator suitable for playing games
License: GPL-2.0-only
Group: System/Emulators/Other
URL: https://www.hatari-emu.org/
Source: https://framagit.org/%{name}/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: portaudio-devel
BuildRequires: portmidi-devel
BuildRequires: python3-gobject-devel
BuildRequires: readline-devel
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(zlib)
Requires: dosfstools
Requires: mtools
# Required by zip2st and atari-hd-image
Requires: unzip
%description
This is an emulator for the Atari ST, STE, TT and Falcon computers.
The Atari ST was a 16/32 bit computer system which was first released by Atari
in 1985. Using the Motorola 68000 CPU, it was a very popular computer having
quite a lot of CPU power at that time.
Unlike many other Atari ST emulators which try to give you a good environment
for running GEM applications, Hatari tries to emulate the hardware of a ST as
close as possible so that it is able to run most of the old ST games and demos.
%prep
%autosetup -n %{name}-v%{version}
# Remove shebang from non executable scripts
for pyfile in dialogs.py hatari.py uihelpers.py config.py
do
sed -i -e '/^#!\//, 1d' python-ui/$pyfile
done
# Fix desktop file
sed -i '/^MimeType=*/s/$/;/' \
share/applications/%{name}.desktop
%build
# FIXME: you should use the %%cmake macros
cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DENABLE_DSP_EMU=1 \
-DENABLE_SDL2=1 \
-DENABLE_WINUAE_CPU=1 \
-DDOCDIR=%{_docdir}/%{name} .
%make_build
%install
%make_install
# Install French man page
install -d -m 755 %{buildroot}%{_mandir}/fr/man1
install -p -m 644 doc/fr/hatari.1 %{buildroot}%{_mandir}/fr/man1
%check
make test
%files
%{_bindir}/*
%{_datadir}/%{name}
%{_mandir}/man1/*
%{_mandir}/fr/man1/*
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/icons/hicolor/*/mimetypes/application-vnd.fastcopy-disk-image.*
%{_datadir}/icons/hicolor/*/mimetypes/application-vnd.msa-disk-image.*
%{_datadir}/icons/hicolor/*/mimetypes/application-x-st-disk-image.*
%{_datadir}/icons/hicolor/*/mimetypes/application-x-stx-disk-image.*
%{_datadir}/mime/packages/hatari.xml
%{_datadir}/applications/*
%{_docdir}/%{name}
%changelog