File exorsim.spec of Package exorsim

#
# spec file for package exorsim
#
# 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:           exorsim

URL:            https://github.com/jhallen/exorsim
Version:        0.0.0+git20230714.a7d515d
Release:        0
Summary:        Motorola M6800 (6800) Exorciser / SWTPC emulator 
License:        GPL-1.0
Group:          System/Emulators/Other
Source:         %{name}-%{version}.tar.gz
Patch1:         0001-Load-facts-from-usr-share-exorsim.patch
Patch2:         0002-Loads-roms-from-usr-share-exorsim-roms.patch
Patch3:         0003-Explain-how-to-get-a-disk-file.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  make
BuildRequires:  dos2unix
BuildRequires:  gcc-c++

%description
EXORsim is a Linux/Cygwin program that simulates a Motorola EXORciser,
which was a development system that Motorola introduced in 1975 based on
their 8-bit 6800 and 6809 microprocessors. 

%prep
%setup
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
make CFLAGS="%{optflags}" %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 unasm exor mdos edos imdx lpf %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
install -m 644 facts %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/%{name}/roms
install -m 644 *.bin %{buildroot}%{_datadir}/%{name}/roms
mkdir -p %{buildroot}%{_datadir}/%{name}/disks
install -m 644 *.dsk %{buildroot}%{_datadir}/%{name}/disks
chmod 644 doc/*

%files
%defattr(-,root,root)
%doc NOTES TODO README.md
%doc *.md
%doc doc/*
%license COPYING
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*

%changelog
openSUSE Build Service is sponsored by