summaryrefslogtreecommitdiffstats
path: root/games/hatari_tos_roms/hatari_tos_roms.SlackBuild
blob: 45f14875a5a7aab9c99aeb005c3de8e05d75763b (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
#!/bin/bash

# Slackware build script for hatari_tos_roms
# Written by B. Watson (urchlay@slackware.uk)

# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.

# The version number is just the date when this script was modified.
# The actual TOS ROM versions are 1.02, 1.04, 2.06

# 20230107 bkw: add missing doc dir. Include our own README since
# there otherwise isn't one.

# 20141029 bkw: fix missing : in VERSION BUILD TAG assignments

# 20140825 bkw:
# - include the 1.04 images, since hatari needs them to allow direct
#   launching of .prg files from the command line.
# - simplify script, the US images used to be optional, now they're
#   required, and we don't need code to modify the slack-desc either.

# I thought about gzipping these, since hatari supports gzipped roms, but
# they're not taking up that much space (1088K uncompressed, 670K gzipped),
# plus other emulators than hatari can use these, and might not support .gz

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=hatari_tos_roms
VERSION=${VERSION:-20230107}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

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

rm -rf $PKG
mkdir -p $PKG/usr/share/hatari $PKG/install

cd $PKG/usr/share/hatari

unzip $CWD/tos_uk.zip
unzip $CWD/tos_us.zip
unzip $CWD/tos104uk.zip
unzip $CWD/tos104us.zip

mv Tos206.img tos-2.06-uk.img
mv Tos102.img tos-1.02-uk.img
mv Tos206us.img tos-2.06-us.img
mv Tos102us.img tos-1.02-us.img
mv tos104uk.img tos-1.04-uk.img
mv tos104us.img tos-1.04-us.img

chown root:root *
chmod 644 *

PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cat $CWD/README > $PKGDOC/README
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild

cat $CWD/slack-desc >$PKG/install/slack-desc
cat $CWD/doinst.sh >$PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE