## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 forgeurl0 https://github.com/jarikomppa/emu8051 %global gitcommit 5dc681275151c4a5d7b85ec9ff4ceb1b25abd5a8 %global gitshort %(echo %{gitcommit} | cut -c 1-8) %global gitdate 20220911 Name: emu8051 Version: 0~%{gitdate}git%{gitshort} Release: %autorelease Summary: 8051/8052 emulator with curses-based UI License: MIT URL: https://solhsa.com/8051.html VCS: git:%{forgeurl0} Source0: https://github.com/jarikomppa/emu8051/archive/%{gitcommit}.tar.gz#/%{name}-%{gitcommit}.tar.gz BuildRequires: gcc make BuildRequires: ncurses-devel BuildRequires: sed %description This is a simulator of the 8051/8052 microcontrollers. For sake of simplicity, I'm only referring to 8051, although the emulator can emulate either one. For more information about the 8-bit chip(s), please check out www.8052.com or look up the data sheets. Intel, being the originator of the architecture, naturally has information as well. The 8051 is a pretty easy chip to play with, in both hardware and software. Hence, it's a good chip to use as an example when teaching about computer hardware. Unfortunately, the simulators in use in my school were a bit outdated, so I decided to write a new one. The scope of the emulator is to help test and debug 8051 assembler programs. What is particularily left out is clock-cycle exact simulation of processor pins. (For instance, MUL is a 48-clock operation on the 8051. On which clock cycle does the CPU read the operands? Or write the result?). Such simulation might help in designing some hardware, but for most uses it is unneccessary and complicated. %prep %autosetup -n %{name}-%{gitcommit} # name resulting binary after the project sed -e "s,^BIN := emu,BIN := %{name}," -i Makefile %build %make_build %install mkdir -p %{buildroot}%{_bindir} install -m 0755 %{name} %{buildroot}%{_bindir}/%{name} %files %license LICENSE %doc README.md %{_bindir}/%{name} %changelog ## START: Generated by rpmautospec * Mon May 06 2024 Petr Menšík - 0~20220911git5dc68127-2 - Use autorelease * Mon May 06 2024 Petr Menšík - 0~20220911git5dc68127-1 - Initial spec file * Sun Sep 11 2022 Jari Komppa - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec