blob: f295811baead8120a0feeb00ed1f3ac401f19d46 (
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
|
# Contributor: Slash <demodevil5[at]yahoo[dot]com>
# Contributor: Babets
# Contributor: Vain
pkgname=warsow
pkgver=0.5
pkgrel=3
pkgdesc="Free online multiplayer competitive FPS based on the Qfusion engine."
url="http://www.warsow.net/"
license=('GPL' 'custom:Warsow Content License')
arch=('i686' 'x86_64')
depends=('curl' 'libjpeg' 'libvorbis' 'libxinerama' 'libxxf86dga' 'libxxf86vm' 'sdl')
makedepends=('mesa' 'openal' 'unzip')
source=('warsow.desktop' 'warsow.launcher' 'wsw-server.launcher' 'wswtv-server.launcher' \
"http://www.derchris.eu/warsow/warsow_${pkgver}_unified.zip" \
"http://www.derchris.eu/warsow/warsow_${pkgver}_sdk.zip")
md5sums=('f9bf60c80820237f7097c4e50a9582cd'
'ec00081d81ad9802a8ca42fc2eac5498'
'f73e10c26197178df71b941b10bf83d7'
'd7e4a69835bbcf801e58307e9d6b951e'
'd0cb961256bbc1b93bf240b8bcf8eff5'
'acd0244435cc63967b0eb3468c21c454')
noextract=("warsow_${pkgver}_unified.zip" "warsow_${pkgver}_sdk.zip")
build() {
cd $srcdir/
# Extract Game Data
unzip -o warsow_${pkgver}_unified.zip -d $srcdir/warsow
# Extract Game Source Code
unzip -o warsow_${pkgver}_sdk.zip -d $srcdir/warsow-src
# Create Destination Directories
install -d $pkgdir/opt/warsow/
# Move Data to Destination Directory
cp -r $srcdir/warsow/basewsw $pkgdir/opt/warsow
# Patch Makefile to use correct program to query for system information
sed -i 's:openal-config:pkg-config:g' $srcdir/warsow-src/source/Makefile
# Patch Sound Code to point to base openal library
sed -i 's:libopenal.so.0:libopenal.so:g' $srcdir/warsow-src/source/snd_openal/snd_main.c
# Patch AngelScript so it compiles correctly on i686
if [ "$CARCH" == "i686" ]; then
sed -i 's:CXXFLAGS = \(.*\):CXXFLAGS = -march=i686 \1:' \
$srcdir/warsow-src/libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
fi
# Compile Warsow
cd $srcdir/warsow-src/source/
make -j1 || return 1
# Move Compiled Data to Destination Directory
cp -r $srcdir/warsow-src/source/release/* \
$pkgdir/opt/warsow
# Install Custom License: Warsow Content License
install -D -m 0644 $srcdir/warsow/docs/license.txt \
$pkgdir/usr/share/licenses/${pkgname}/license.txt
# Install Client Game Launcher
install -D -m 0755 $srcdir/warsow.launcher \
$pkgdir/usr/bin/warsow
# Install Server Game Launcher
install -D -m 0755 $srcdir/wsw-server.launcher \
$pkgdir/usr/bin/wsw-server
# Install WSWTV Server Launcher
install -D -m 0755 $srcdir/wswtv-server.launcher \
$pkgdir/usr/bin/wswtv-server
# Install Client Desktop Shortcut
install -D -m 0644 $srcdir/warsow.desktop \
$pkgdir/usr/share/applications/warsow.desktop
# Install Icon
install -D -m 0644 $srcdir/warsow-src/source/win32/warsow.ico \
$pkgdir/usr/share/pixmaps/warsow.ico
}
|