## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global commit a980a4cda7a874e769a89b920cd06f4bb355f45c # avoid several LTO type mismatch warnings %global _lto_cflags %nil Name: mmix Version: 20240731 Release: %autorelease Summary: MMIX simulators, assembler, and tools License: Knuth URL: https://mmix.cs.hm.edu/ Source0: https://gitlab.lrz.de/mmix/mmixware/-/archive/%{commit}/mmixware-%{commit}.tar.gz Source1: https://mmix.cs.hm.edu/tools/mmixtex/mmixtex.zip # CWEB "patches" to add features Source200: https://gitlab.lrz.de/mmix/util/-/raw/master/mmoimg/mmoimg.ch BuildRequires: gcc BuildRequires: make # TeX commands BuildRequires: texlive-cweb BuildRequires: texlive-metafont BuildRequires: texlive-mfware BuildRequires: texlive-pdftex # TeX macros BuildRequires: tex(cmtt9.pfb) BuildRequires: tex(epsf.tex) BuildRequires: tex(iftex.sty) %description MMIX is a computer intended to illustrate machine-level aspects of programming. In the books The Art of Computer Programming, it replaces MIX, the 1960s-style machine that formerly played such a role. MMIX was designed so that its machine language would be simple, elegant, and easy to learn. At the same time it includes all of the complexities needed to achieve high performance in practice, so that MMIX could in principle be built and even perhaps be competitive with some of the fastest general-purpose computers in the marketplace. %prep %setup -q -c -b 0 -a 1 -n mmixware-%{commit} cp %{SOURCE200} . %build # create mmoimg ctangle mmotype.w mmoimg.ch mmoimg.c cweave mmotype.w mmoimg.ch mmoimg.tex make all mmoimg CFLAGS="%{optflags} -std=gnu11 -fsigned-char" for f in mm*.w; do make ${f%.w}.pdf PDFTEX=pdftex done pdftex mmoimg.tex %check ./mmixal -x -b 250 -l copy.mml copy.mms ./mmix copy copy.mms > copy.out diff -u copy.mms copy.out ./mmixal -x -b 250 -l hello.mml hello.mms ./mmix -Dhello.mmb hello.mmo echo -e '10000\nq' | ./mmmix plain.mmconfig hello.mmb ./mmixal -x -b 250 -l silly.mml silly.mms ./mmix -Dsilly.mmb silly.mmo echo -e '10000\nq' | ./mmmix plain.mmconfig silly.mmb %install mkdir -p $RPM_BUILD_ROOT%{_bindir} install mmix mmixal mmmix mmotype mmoimg $RPM_BUILD_ROOT%{_bindir}/ %files %doc README *.pdf %{_bindir}/mmix %{_bindir}/mmixal %{_bindir}/mmmix %{_bindir}/mmotype %{_bindir}/mmoimg %changelog ## START: Generated by rpmautospec * Thu May 01 2025 John Doe - 20240731-1 - Uncommitted changes ## END: Generated by rpmautospec