Package x16-rom: Specfile

Name: x16-rom
Version: r38
Release: alt5

Summary: Commander X16 BASIC/KERNAL/DOS/GEOS ROM
License: BSD2
Group: Development/Tools

Url: https://github.com/commanderx16/x16-rom
Source: %name-%version.tar
Packager: Artyom Bystrov <arbars@altlinux.org>

#BuildArch: noarch

BuildRequires: gcc
BuildRequires: make
BuildRequires: cc65-devel
%ifnarch %e2k
BuildRequires: pandoc
%endif

%description
This is the Commander X16 ROM containing BASIC,
KERNAL, DOS and GEOS. BASIC and KERNAL are
derived from the Commodore 64 versions.
GEOS is derived from the C64/C128 version.

%prep
%setup

%build
%ifnarch %e2k
pandoc \
    --from gfm \
    --to html -c github-pandoc.css \
    --standalone \
    --metadata pagetitle="X16 KERNAL/BASIC/DOS ROM" README.md \
    --output KERNAL-BASIC.html
%endif

%make_build

%install
mkdir -p %buildroot%_datadir/%name
mkdir -p %buildroot%_docdir/%name
install -p -m 0775 build/x16/rom.bin %buildroot%_datadir/%name/%name.bin
install -p -m 0775 build/x16/*.sym %buildroot%_datadir/%name
%ifnarch %e2k
install -Dm644 KERNAL-BASIC.html %buildroot%_docdir/%name/KERNAL-BASIC.html
install -Dm644 github-pandoc.css %buildroot%_docdir/%name/github-pandoc.css
%endif

%files
%doc README.md
%_datadir/%name/%name.bin
%_datadir/%name/*.sym
%ifnarch %e2k
%_docdir/%name/KERNAL-BASIC.html
%_docdir/%name/github-pandoc.css
%endif

%changelog
* Sun Jan 16 2022 Michael Shigorin <mike@altlinux.org> r38-alt5
- E2K: build without pandoc (unavailable for now)
  + this means archdep spec (still data size is small)
- minor spec cleanup

* Wed Aug 11 2021 Artyom Bystrov <arbars@altlinux.org> r38-alt4
- update sources to "master" branch

* Fri Aug 06 2021 Artyom Bystrov <arbars@altlinux.org> r38-alt3
- add noarch

* Fri Aug 06 2021 Artyom Bystrov <arbars@altlinux.org> r38-alt2
- Delete unneeded Requires 

* Sat Jan 09 2021 Artyom Bystrov <arbars@altlinux.org> r38-alt1
- initial build for ALT Sisyphus