File wangemu.spec of Package wangemu
##
# spec file for package wangemu
#
# Copyright (c) 2025 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: wangemu
Version: 0.0.0~git20210621.12c760f
Release: 0
Summary: Wang 2200 Computer Emulator
License: MIT
Group: System/Emulators/Other
URL: https://www.wang2200.org/emu.html
Source: %{name}-%{version}.tar.gz
Patch1: 0001-include-cstring-for-GCC-15.patch
Patch2: 0002-reduce-warnings.patch
Patch3: 0003-define-Linux-options.patch
Patch4: 0004-Makefile-for-Linux-builds.patch
Patch5: 0005-support-german-keyboard.patch
Patch6: 0006-Build-script-for-docs.patch
Patch7: 0007-Implement-Linux-configuration.patch
Patch8: 0008-Fix-segfault-when-bad-empty-.ini-file-is-detected.patch
Patch9: 0009-Use-DATADIR-for-sounds.patch
Patch10: 0010-use-.wangemu-as-user-config-dir.patch
Patch11: 0011-use-DOCDIR-for-docs.patch
Patch12: 0012-fix-unicode-string-and-add-myself.patch
BuildRequires: ctags
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: perl-Image-Info
BuildRequires: perl-Image-Size
BuildRequires: perl-Template-Toolkit
BuildRequires: wxWidgets-3_2-devel
%description
Wangemu is able to emulate a Wang 2200, 2200VP, or 2200MVP computer.
Wangemu allows building a system configuration, including
- CPU type (2200B, 2200T, 2200VP, 2200MVP, MicroVP)
- amount of system RAM
- what type of peripheral is loaded into each of the backplane slots
%prep
%setup -q
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
%patch -P8 -p1
%patch -P9 -p1
%patch -P10 -p1
%patch -P11 -p1
%patch -P12 -p1
%build
make %{?_smp_mflags} DATADIR=%{_datadir}/%{name} DOCDIR=%{_docdir}/%{name} -f Makefile.linux opt
(cd build_html; ./build_html.sh)
%install
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_docdir}/%{name}
install -d %{buildroot}%{_docdir}/%{name}/html
install -d %{buildroot}%{_docdir}/%{name}/html/img
install -d %{buildroot}%{_datadir}/%{name}
install -d %{buildroot}%{_datadir}/%{name}/sounds
install -d %{buildroot}%{_datadir}/%{name}/scripts
install -m 755 wangemu %{buildroot}%{_bindir}
install -m 644 sounds/* %{buildroot}%{_datadir}/%{name}/sounds
install -m 644 scripts/* %{buildroot}%{_datadir}/%{name}/scripts
install -m 644 disks/* %{buildroot}%{_datadir}/%{name}
install -m 644 html/*.html %{buildroot}%{_docdir}/%{name}/html
install -m 644 html/img/* %{buildroot}%{_docdir}/%{name}/html/img
%fdupes %{buildroot}%{_bindir}
%files
%defattr(-, root, root)
%license LICENSE
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%doc README.md relnotes.txt
%dir %{_docdir}/%{name}
%dir %{_docdir}/%{name}/html
%dir %{_docdir}/%{name}/html/img
%{_docdir}/%{name}/html/*.html
%{_docdir}/%{name}/html/img/*
%changelog