blob: 5947c1fe0c5eed64afe3965a9e39b72524f8999d (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
#!/bin/sh
# Slackware build script for <UrbanTerror>
# Written by (Matthew Fillpot) (mfilpot at gmail.com)
# urbanterror game is utilizing materials that are covered under the following
# licenses:
# Quake 3 SDK license - the game engine source code is closed source
# GPL license - ioUrbanTerror uses the GPL license and its source code
# is openly available
#
# Full copies of the licenses wil lbe installed in /usr/doc/urbanterror-4.1
# TODO LIST:
# Move binaries from /usr/libexec to /usr/games
# setup symlinks in /usr/bin to the execs
#
# DATA FILES - /usr/share/games X
# BIN - /usr/games/
# exec - symlinks in /usr/bin
PRGNAM=UrbanTerror
VERSION=${VERSION:-4.1}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SRCVER=$(echo $VERSION|tr -d ".")
if [ "$ARCH" = "i486" ]; then
EXEC="i386"
elif [ "$ARCH" = "i686" ]; then
EXEC="i386"
elif [ "$ARCH" = "x86_64" ]; then
EXEC="x86_64"
fi
set -e # Exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
unzip $CWD/${PRGNAM}_${SRCVER}_FULL.zip -d $PKG
mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
mv $PRGNAM $PKG/usr/share/games/$PRGNAM-$VERSION
# Make the current arch execs executable
chmod a+x $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.${EXEC}
chmod a+x $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrTded.${EXEC}
# Move the executables
mkdir -p $PKG/usr/games/$PRGNAM
mv $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.${EXEC} \
$PKG/usr/games/$PRGNAM/urbanterror
mv $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrTded.${EXEC} \
$PKG/usr/games/$PRGNAM/ioUrTded.${EXEC}
# Make symlinks to allow the executables to use the data files
cd $PKG/usr/games/$PRGNAM
ln -s ../../share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.app .
ln -s ../../share/games/$PRGNAM-$VERSION/$PRGNAM/q3ut4 .
cd -
# Setup symlinks to binaries in /usr/bin
mkdir -p $PKG/usr/bin
cd $PKG/usr/bin
ln -s ../games/$PRGNAM/urbanterror .
ln -s ../games/$PRGNAM/ioUrTded.${EXEC} .
cd -
# Place the icon and .desktop files
mkdir $PKG/usr/share/{applications,pixmaps}
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/q3ut.png > $PKG/usr/share/pixmaps/q3ut.png
# Remove unused files
rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.exe \
$PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.url
if [ $EXEC = i386 ]; then
rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.x86_64
elif [ $EXEC = x86_64 ]; then
rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.i386
fi
rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.app/Contents/MacOS
rm -rf "$PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/q3ut4/Urban Terror on the Web.url"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/games/$PRGNAM-$VERSION/${PRGNAM}/*.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir $PKG/install
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.tgz
|