updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / warsow-openbox / PKGBUILD
blob3b19b0a54f37c62b1d5afaabaa5a91f381e196dd
1 # $Id$
2 # Maintainer: Ivo Nunes <netherblood@gmail.com>
3 # Patch created by K1ll from the Warsow forums
5 pkgname=warsow-openbox
6 pkgver=0.62
7 pkgrel=2
8 pkgdesc="A free online multiplayer competitive FPS based on the Qfusion engine. This package applies a patch to fix fullscreen under Openbox."
9 url="http://www.warsow.net/"
10 license=('GPL')
11 arch=('i686' 'x86_64') 
12 depends=('curl' 'libjpeg' 'libvorbis' 'libxinerama' 'libxxf86dga' 
13 'libxxf86vm' 'sdl' 'warsow-data')
14 makedepends=('mesa' 'openal' 'unzip')
15 optdepends=('openal: for openal audio support')
16 source=('warsow.desktop' 'warsow.launcher' 'wsw-server.launcher' 
17 'wswtv-server.launcher' 'warsowopenboxfs.patch' \
18 "http://www.zcdn.org/dl/warsow_${pkgver}_sdk.zip")
19 noextract=("warsow_${pkgver}_sdk.zip")
20 md5sums=('f9bf60c80820237f7097c4e50a9582cd'
21          'ec00081d81ad9802a8ca42fc2eac5498'
22          'f73e10c26197178df71b941b10bf83d7'
23          'd7e4a69835bbcf801e58307e9d6b951e'
24          '0a69ded6ac1c432173e5052732e17401'
25          '649568447e938efded07e77cdfb3accb')
27 build() {
28   unset CFLAGS
29         unset CXXFLAGS
31   # Extract Game Source Code
32   unzip -o warsow_${pkgver}_sdk.zip -d $srcdir/warsow-src
34   # Patch Makefile to use correct program to query for system information
35   sed -i 's:openal-config:pkg-config:g' $srcdir/warsow-src/source/Makefile
37   # Patch Makefile to correctly pass on ld opts
38   sed -i 's:--as-needed:-Wc,--as-needed:g' $srcdir/warsow-src/source/Makefile
40   # Patch Sound Code to point to base openal library
41   sed -i 's:libopenal.so.0:libopenal.so:g' $srcdir/warsow-src/source/snd_openal/snd_main.c
43   # Patch for libjpeg8
44   sed -i 's/jpeg_mem_src/_jpeg_mem_src/g' $srcdir/warsow-src/source/ref_gl/r_image.c
46   # Patch AngelScript so it compiles correctly on i686
47   if [ "$CARCH" == "i686" ]; then
48       sed -i 's:CXXFLAGS = \(.*\):CXXFLAGS = -march=i686 \1:' \
49           $srcdir/warsow-src/libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc/makefile
50   fi
51   
52   # Patch game for Openbox so fullscreen works
53   cd $srcdir/warsow-src/source/unix/
54   cp ../../../../warsowopenboxfs.patch $srcdir/warsow-src/source/unix/
55   patch -p2 < warsowopenboxfs.patch
57   # Compile Warsow
58   cd $srcdir/warsow-src/source/
59   make -j1
62 package() {
63   cd $srcdir/warsow-src/source/
64   
65   # Create Destination Directories
66   install -d $pkgdir/opt/warsow/
68   # Move Compiled Data to Destination Directory
69   cp -r $srcdir/warsow-src/source/release/* \
70       $pkgdir/opt/warsow
72   # Install Client Game Launcher
73   install -D -m 0755 $srcdir/warsow.launcher \
74       $pkgdir/usr/bin/warsow
76   # Install Server Game Launcher
77   install -D -m 0755 $srcdir/wsw-server.launcher \
78       $pkgdir/usr/bin/wsw-server
80   # Install WSWTV Server Launcher
81   install -D -m 0755 $srcdir/wswtv-server.launcher \
82       $pkgdir/usr/bin/wswtv-server
84   # Install Client Desktop Shortcut
85   install -D -m 0644 $srcdir/warsow.desktop \
86       $pkgdir/usr/share/applications/warsow.desktop
88   # Install Icon
89   install -D -m 0644 $srcdir/warsow-src/source/win32/warsow.ico \
90       $pkgdir/usr/share/pixmaps/warsow.ico
93 # vim: ts=2:sw=2