summaryrefslogtreecommitdiff
path: root/games/hatari_tos_roms/hatari_tos_roms.SlackBuild
blob: ff14c1eef1ba27548a4122fa17f10ca5273762c1 (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
#!/bin/sh

# Slackware build script for hatari_tos_roms
# Written by B. Watson (yalhcru@gmail.com)

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

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

# 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

PRGNAM=hatari_tos_roms
VERSION=${VERSION-20140825}
ARCH=noarch
BUILD=${BUILD-1}
TAG=${TAG-_SBo}

CWD=$(pwd)
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 *

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:-tgz}