blob: 79a9ff003096b06a7e41aced08e41ec5123918bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#!/bin/bash
# Slackware build script for trs80-roms
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230516 bkw: v20230516, add NewDOS image for Model I.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=trs80-roms
VERSION=${VERSION:-20230516}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
PKGROMS=$PKG/usr/share/trs80-roms
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG
mkdir -p $TMP $PKGROMS $PKGDOC $OUTPUT
cd $PKGROMS
# There is no "source" directory; everything is extracted directly
# to $PKG.
# Model I: level1.rom and level2.rom
unzip -q $CWD/trs_roms.zip
# Model III and 4: model3.rom and model4.rom.
# Do not use the model4p.rom from this zip file, it won't work with
# sdltrs or xtrs.
unzip -LL -q $CWD/trs80-62.zip 'model?.rom'
# Model 4P: model4p.rom. Both emulators can actually get by without this
# (they have a built-in "hack" ROM that can boot a disk), but for
# versimilitude, let's include the real deal. This is a split MAME ROM,
# we have to combine the parts for xtrs and sdltrs.
unzip -q $CWD/trs80m4p.zip 8075332.u69 8049007.u103
cat 8075332.u69 8049007.u103 > model4p.rom
rm -f 8075332.u69 8049007.u103
# LS-DOS (not a ROM, a disk image). The zip file comment goes in $PKGDOC,
# since it's useful documentation.
unzip -q $CWD/ld4-631.zip
unzip -z $CWD/ld4-631.zip > $PKGDOC/ld4-631.txt
# 2 more disk images: cpmutil.dsk and utility.dsk. These ship with both
# sdltrs and xtrs, and are identical in both source tarballs.
tar xf $CWD/xtrs-4.9d.tar.gz --strip-components=1 --wildcards '*.dsk'
# Another disk image: a bootable DOS for the Model I.
cat $CWD/NEWDOS_80sssd_jv1.DSK > newdos_80sssd_jv1.dsk
chmod 644 *
chown root:root *
# No docs, include our own README (better than nothing).
cat $CWD/README > $PKGDOC/README
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|