File atari800.spec of Package atari800

#
# spec file for package atari800
#
# Copyright (c) 2024 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:           atari800
Version:        5.2.0
Release:        0
Summary:        An emulator of 8-bit Atari personal computers
License:        GPL-2.0-only
Group:          System/Emulators/Other
URL:            https://atari800.github.io/
Source:         https://github.com/%{name}/%{name}/releases/download/ATARI800_5_2_0/%{name}-%{version}-src.tgz
Source1:        xf25.zip
BuildRequires:  dos2unix
BuildRequires:  pkgconfig
BuildRequires:  readline-devel
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(sdl)

%description
Atari800 is an emulator for the 800, 800XL, 130XE and 5200 models of
the Atari personal computer. It can be used on console, FrameBuffer or X11.
It features excellent compatibility, HIFI sound support, artifacting
emulation, precise cycle-exact ANTIC/GTIA emulation and more.

%prep
%setup -q

%build
%configure
%make_build

%install
%make_install

rm -fr %{buildroot}%{_datadir}/doc
mkdir -p %{buildroot}%{_datadir}/atari800
unzip -d %{buildroot}%{_datadir}/atari800 -L %{SOURCE1}
rm -f %{buildroot}%{_datadir}/atari800/xf25.*
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{128x128,scalable}/apps/
cp $RPM_BUILD_DIR/%{name}-%{version}/data/atari2.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
cp $RPM_BUILD_DIR/%{name}-%{version}/data/atari2.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
# Fix for makefile-junk
rm -f DOC/Makefile*
# Fix for wrong-file-end-of-line-encoding
dos2unix -c ascii DOC/INSTALL.falcon

%suse_update_desktop_file -c %{name} "Atari 800 emulator" "An emulator for the 8bit Atari personal computers." %{name} %{name} "System;Emulator;"

%files
%license COPYING
%doc README.TXT DOC/*
%{_bindir}/atari800
%{_bindir}/cart
%{_datadir}/atari800
%{_mandir}/man1/atari800.1%{?ext_man}
%{_datadir}/applications/atari800.desktop
%{_datadir}/icons/hicolor/

%changelog
openSUSE Build Service is sponsored by