blob: 2b4c415c2678432d1e1e96993b9626d1888cf530 (
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
|
#!/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 will be installed in /usr/doc/urbanterror-4.1
PRGNAM=UrbanTerror
VERSION=${VERSION:-4.1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
ZIP_VERS=$(echo $VERSION|tr -d ".")
if [ "$ARCH" = "i486" ]; then
EXEC="i386"
LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
elif [ "$ARCH" = "i686" ]; then
EXEC="i386"
LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
elif [ "$ARCH" = "x86_64" ]; then
EXEC="x86_64"
LIBDIRSUFFIX=${LIBDIRSUFFIX:-"64"}
else
echo "Unrecognized architecture type! Check the script: $0"
exit 1
fi
CLIENT_EXEC=${CLIENT_EXEC:-ioUrbanTerror.${EXEC}}
SERVER_EXEC=${SERVER_EXEC:-ioUrTded.${EXEC}}
set -e # Exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
unzip $CWD/${PRGNAM}_${ZIP_VERS}_FULL.zip -d $PKG/usr/lib${LIBDIRSUFFIX}
# Make the current arch execs executable
chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/{${CLIENT_EXEC},${SERVER_EXEC}}
# Create symlinks in /usr/games
mkdir -p $PKG/usr/games
cd $PKG/usr/games
ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/${CLIENT_EXEC} urbanterror
ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/${SERVER_EXEC} .
cd -
# Correct the curl dependancy
echo -e "seta cl_cURLLib \"libcurl.so.4.1.1\"" >> \
$PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/q3ut4/autoexec.cfg
# Add a menu entry and icon
mkdir -p $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 from the package
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/{,q3ut4/}*.{doc,exe,url}
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/ioUrbanTerror.app/Contents/MacOS
[ "$EXEC" != "i386" ] && rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/*.i386
[ "$EXEC" != "x86_64" ] && rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/*.x86_64
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/ioUrbanTerror_* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cp $CWD/docs/*.txt $PKG/usr/doc/$PRGNAM-$VERSION/
mkdir $PKG/install
cp -p $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}
|