File ti99sim.spec of Package ti99sim
#
# spec file for package ti99sim
#
# 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: ti99sim
Version: 0.16.0
Release: 0
Summary: A Texas Instruments TI-99/4A Home Computer Emulator
License: GPL-2.0-or-later
Group: System/Emulators/Other
URL: https://www.mrousseau.org/programs/ti99sim/
Source0: https://www.mrousseau.org/programs/ti99sim/archives/%{name}-%{version}.src.tar.xz
Source1: ti99sim.png
# PATCH-FIX-UPSTREAM ti99sim-fix-missing-cstring.patch -- Fix missing include of cstring header
Patch0: ti99sim-fix-missing-cstring.patch
BuildRequires: libboost_regex-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(sdl2)
# compilation fails with gcc7
%if 0%{?sle_version} >= 150500 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
BuildRequires: gcc12
BuildRequires: gcc12-c++
%else
BuildRequires: gcc-c++
%endif
%description
An emulator for the Texas Instruments TI-99/4A Home Computer.
It features full sound speech emulation and supports emulation
of the Gram Krackerâ„¢, TI-Disk system and 32K Memory expansion unit.
Note: In order to run the emulator, you need to create a cartridge
that contains the console ROM & GROMs from the TI.
Texas Instruments will not allow these to be distributed,
so you'll need to find a way to get them yourself.
%prep
%autosetup -p1
%build
# compilation fails with gcc7
%if 0%{?sle_version} >= 150500 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
export CC="gcc-12"
export CXX="g++-12"
%endif
%make_build OS=OS_LINUX
%install
mkdir -p %{buildroot}%{_bindir}
cp -p bin/%{name}-sdl %{buildroot}%{_bindir}/
cp -p bin/%{name}-console %{buildroot}%{_bindir}/
cp -p bin/catalog %{buildroot}%{_bindir}/
cp -p bin/convert-ctg %{buildroot}%{_bindir}/
cp -p bin/decode %{buildroot}%{_bindir}/
cp -p bin/disk %{buildroot}%{_bindir}/
cp -p bin/dumpcpu %{buildroot}%{_bindir}/
cp -p bin/dumpgrom %{buildroot}%{_bindir}/
cp -p bin/dumpspch %{buildroot}%{_bindir}/
cp -p bin/list %{buildroot}%{_bindir}/
cp -p bin/mkcart %{buildroot}%{_bindir}/
cp -p bin/mkspch %{buildroot}%{_bindir}/
cp -p bin/say %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/%{name}/console
mkdir -p %{buildroot}%{_datadir}/%{name}/cartridges
mkdir -p %{buildroot}%{_datadir}/%{name}/disks
mkdir -p %{buildroot}%{_datadir}/%{name}/scripts
cp -p scripts/* %{buildroot}%{_datadir}/%{name}/scripts
install -Dm 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -c %{name} %{name} 'TI99/4A Emulator' %{name}-sdl %{name} 'System;Emulator;'
%files
%license doc/COPYING
%doc doc/*.html doc/*.css
%{_bindir}/%{name}-sdl
%{_bindir}/%{name}-console
%{_bindir}/catalog
%{_bindir}/convert-ctg
%{_bindir}/decode
%{_bindir}/disk
%{_bindir}/dumpcpu
%{_bindir}/dumpgrom
%{_bindir}/dumpspch
%{_bindir}/list
%{_bindir}/mkcart
%{_bindir}/mkspch
%{_bindir}/say
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog