blob: fafe7279410b47b43690e7efc7ee1de68c97c5f6 (
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
|
#!/bin/sh
# Slackware build script for bloodcm
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Just repacks the data, no compiling or executables.
# No icon or .desktop, because no executables.
PRGNAM=bloodcm
VERSION=${VERSION:-02.2016}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
# depending on what the file was downloaded with, it'll be named
# either of these:
ZIPFILE="38-blood-crossmatching"
[ -e $CWD/$ZIPFILE ] || ZIPFILE="${PRGNAM}_v${VERSION}.zip"
# directory inside the zipfile containing the stuff we want. the
# rest is binaries for windows.
DIRNAME="BloodCM"
# this needs to match eduke32.SlackBuild. the wrapper script for
# eduke32 looks here for mods, and symlinks them into the user's
# ~/.eduke32/ so the game can find them.
EDUKEDIR=/usr/share/games/eduke32
# we don't even need a $TMP/$PRGNAM-$VERSION, just extract
# straight into $PKG
rm -rf $PKG/$EDUKEDIR
mkdir -p $TMP $PKG/$EDUKEDIR $OUTPUT
cd $PKG/$EDUKEDIR
unzip $CWD/$ZIPFILE "$DIRNAME/*"
find $DIRNAME -type f -print0 | xargs -0 chmod 644
find $DIRNAME -type d -print0 | xargs -0 chmod 755
# don't ship an empty texture cache
rm -f $DIRNAME/textures $DIRNAME/textures.cache
# upstream has no docs, we'll include our own README, which tells
# the user how to run the game.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
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}
|