blob: 95e4752391c1d798d90acd4d6b1f83224e612ef6 (
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
|
#!/bin/sh
# Slackware build script for sdlmame data
# Written by Pablo Santamaria (pablosantamaria@gmail.com)
PRGNAM=sdlmame-data
VERSION=${VERSION:-0.136}
SRCVER=$( echo $VERSION | cut -d. -f2 )
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
SOURCE1="mamehistory$SRCVER.zip"
SOURCE2="Mameinfo0$SRCVER.zip"
SOURCE3="ctrlr.rar"
SOURCE4="catveren.zip"
SOURCE5="nplayers0$SRCVER.zip"
SOURCE6="cheat0$SRCVER.zip"
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
# Extract dat file
unzip $CWD/$SOURCE1
unzip $CWD/$SOURCE2
7z x Mameinfo0$SRCVER.exe
mv docs mameinfo
unzip -a $CWD/$SOURCE4
mkdir -p catveren
mv readme.txt catveren
unzip -a $CWD/$SOURCE5
mv docs nplayers
unzip $CWD/$SOURCE6
# Fix permissions and line endings
chmod 0644 mameinfo/*.txt
chmod 0755 mameinfo
sed -i 's/\r//' mameinfo/* nplayers/nplayers.txt
# Install
install -d $PKG/usr/share/games/mame
install -pm 644 history.dat mameinfo.dat Catver.ini nplayers.ini cheat.zip \
$PKG/usr/share/games/mame
7z x -o$PKG/usr/share/games/mame $CWD/$SOURCE3
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
catveren/readme.txt nplayers/nplayers.txt mameinfo cheat.txt readhist.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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:-tgz}
|