diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ff1285 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +simh-3.8.1-noroms.tar.gz +/simh-3.9.0-noroms.tar.gz +/simh-3.11.0-noroms.tar.gz +/simh-3.12.5-noroms.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index 279d5a4..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: simh -# $Id$ -NAME := simh -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/build-fix.patch b/build-fix.patch new file mode 100644 index 0000000..18df6de --- /dev/null +++ b/build-fix.patch @@ -0,0 +1,12 @@ +diff -wbBur sim/PDP11/pdp11_ch.c sim.q/PDP11/pdp11_ch.c +--- sim/PDP11/pdp11_ch.c 2024-05-05 11:03:00.000000000 +0300 ++++ sim.q/PDP11/pdp11_ch.c 2024-11-17 00:33:07.981278910 +0300 +@@ -271,7 +271,7 @@ + CONST uint8 *p; + + tmxr_poll_rx (&ch_tmxr); +- if (tmxr_get_packet_ln (&ch_lines[0], &p, &count) != SCPE_OK) { ++ if (tmxr_get_packet_ln (&ch_lines[0], (void*)&p, &count) != SCPE_OK) { + sim_debug (DBG_ERR, &ch_dev, "TMXR error receiving packet\n"); + return 0; + } diff --git a/changelog b/changelog new file mode 100644 index 0000000..2e22ae8 --- /dev/null +++ b/changelog @@ -0,0 +1,129 @@ +* Tue Feb 25 2025 Davide Cavalca - 3.11.0-28 +- Convert the spec from tabs to spaces +- Refactor and update the spec to follow the latest packaging guidelines + +* Sun Jan 19 2025 Fedora Release Engineering - 3.11.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 04 2024 Miroslav Suchý - 3.11.0-26 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 3.11.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 3.11.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 3.11.0-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jan 24 2023 Lucian Langa - 3.11.0-22 +- forgot the patch file in previous commit + +* Tue Jan 24 2023 Lucian Langa - 3.11.0-21 +- add patch from Joshua Cogliati to fix FTBFS +- update build flags + +* Sat Jan 21 2023 Fedora Release Engineering - 3.11.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 3.11.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 3.11.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.11.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 3.11.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 3.11.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Apr 05 2020 Lucian Langa - 3.9.0-14 +- update generation script +- apply temporary gcc10 fix +- update to latest upstream + +* Thu Jan 30 2020 Fedora Release Engineering - 3.9.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 3.9.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 3.9.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 3.9.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 3.9.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 3.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 3.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 3.9.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 3.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 3.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Jan 24 2014 Lucian Langa - 3.9.0-1 +- sync with latest upstream stable +- drop all patches - fixed upstream +- fix bogus dates + +* Tue Aug 06 2013 Lucian Langa - 3.8.1-11 +- don't create versioned docdir + +* Sun Aug 04 2013 Fedora Release Engineering - 3.8.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 3.8.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 3.8.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 3.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed May 19 2010 Lucian Langa - 3.8.1-6 +- bump rel to fix NVR higher than previous version + +* Sat Jan 09 2010 Lucian Langa - 3.8.1-5 +- fix altair segfault + +* Tue Nov 17 2009 Lucian Langa - 3.8.1-4 +- add correct source + +* Fri Nov 13 2009 Lucian Langa - 3.8.1-3 +- update description + +* Sun Nov 08 2009 Lucian Langa - 3.8.1-2 +- add correct generate script + +* Thu Oct 08 2009 Lucian Langa - 3.8.1-1 +- remove separate docs +- misc cleanups +- new upstream release + +* Wed Dec 24 2008 Lucian Langa - 3.8.0-1 +- initial spec file + + diff --git a/simh-generate-tarball.sh b/simh-generate-tarball.sh new file mode 100755 index 0000000..ab13403 --- /dev/null +++ b/simh-generate-tarball.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +VERSION=$1 +MAJOR=${VERSION:0:1} +MINOR=${VERSION:2:2} +PATCH=${VERSION:5:1} + +unzip -o simhv$MAJOR$MINOR-$PATCH.zip -d simh-$VERSION +rm simh-$VERSION/VAX/ka655* +rm -Rf simh-$VERSION/Ibm1130 +sed -i -e "s/ ibm1130 / /" simh-$VERSION/makefile + +tar -czvf simh-$VERSION-noroms.tar.gz simh-$VERSION diff --git a/simh.spec b/simh.spec new file mode 100644 index 0000000..0a73311 --- /dev/null +++ b/simh.spec @@ -0,0 +1,97 @@ +Name: simh +Version: 3.12.5 +Release: %autorelease +Summary: Highly portable, multi-system emulator + +# The licensing is mostly MIT, but there is also some GPL+ (literally, v1+) code +# in there, notably in AltairZ80/. +# (each target is compiled into its own binary, so only AltairZ80 is GPL+) +License: MIT AND GPL-1.0-or-later + +URL: http://simh.trailing-edge.com/ +Source0: simh-%{version}-noroms.tar.gz +# we use +# this script to remove the roms binary and patented code before shipping it. +# Download the upstream tarball and invoke this script while in the +# tarball's directory: +# ./simh-generate-tarball.sh 3.8.1 +Source1: simh-generate-tarball.sh +Patch: https://gitlab.archlinux.org/archlinux/packaging/packages/simh/-/raw/3.12.5-1/build-fix.patch + +BuildRequires: gcc +BuildRequires: make +BuildRequires: sed + +BuildRequires: libpcap-devel + +%description +SIMH is a historical computer simulation system. It consists of simulators +for many different computers, all written around a common user +interface package and set of supporting libraries. +SIMH can be used to simulate any computer system for which sufficient detail +is available, but the focus to date has been on simulating computer systems +of historic interest. + +SIMH implements simulators for: + +* Data General Nova, Eclipse +* Digital Equipment Corporation PDP-1, PDP-4, PDP-7, PDP-8, PDP-9, PDP-10, + PDP-11, PDP-15, VAX +* GRI Corporation GRI-909, GRI-99 +* IBM 1401, 1620, 7090/7094, System 3 +* Interdata (Perkin-Elmer) 16b and 32b systems +* Hewlett-Packard 2114, 2115, 2116, 2100, 21MX, 1000 +* Honeywell H316/H516 +* MITS Altair 8800, with both 8080 and Z80 +* Royal-Mcbee LGP-30, LGP-21 +* Scientific Data Systems SDS 940 + +%prep +%autosetup -n %{name}-%{version}/sim -p1 + +# Convert docs to UNIX line endings +sed -i 's/\r$//' */*.txt + +%build +CC="$CC -I . -fPIE -g -D_LARGEFILE64_SOURCE" +LDFLAGS="$LDFLAGS -lm -lpcap" +%make_build -e ROMS_OPT="%{optflags}" USE_NETWORK=1 LIBPATH="${_libdir}" + +%install +for i in BIN/*; do + [ -f "$i" ] && install -Dpm0755 "$i" "%{buildroot}%{_bindir}/simh-$(basename "$i")" +done + +%files +%{_bindir}/simh-altair +%{_bindir}/simh-eclipse +%{_bindir}/simh-gri +%{_bindir}/simh-h316 +%{_bindir}/simh-i1401 +%{_bindir}/simh-i1620 +%{_bindir}/simh-i7094 +%{_bindir}/simh-id16 +%{_bindir}/simh-id32 +%{_bindir}/simh-lgp +%{_bindir}/simh-nova +%{_bindir}/simh-pdp1 +%{_bindir}/simh-pdp10 +%{_bindir}/simh-pdp11 +%{_bindir}/simh-pdp15 +%{_bindir}/simh-pdp4 +%{_bindir}/simh-pdp7 +%{_bindir}/simh-pdp8 +%{_bindir}/simh-pdp9 +%{_bindir}/simh-sds +%{_bindir}/simh-sigma +%{_bindir}/simh-uc15 +%{_bindir}/simh-vax +%{_bindir}/simh-vax780 +%doc ALTAIR/altair.txt NOVA/eclipse.txt +%doc I7094/i7094_bug_history.txt Interdata/id_diag.txt +%doc PDP1/pdp1_diag.txt PDP10/pdp10_bug_history.txt PDP18B/pdp18b_diag.txt +%doc S3/haltguide.txt S3/readme_s3.txt S3/system3.txt SDS/sds_diag.txt +%doc VAX/vax780_bug_history.txt + +%changelog +%autochangelog diff --git a/sources b/sources index e69de29..948f0c9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (simh-3.12.5-noroms.tar.gz) = 5441199cebc35e49f44fddbc049c29680c1d00aac2c514f2cb3a9649188d6c3f50613e647d7de9b064a4b2d5e81037854efb056891033c240331edf69c9fbbb3