summaryrefslogtreecommitdiff
path: root/community/openarena/PKGBUILD
blob: 6a730239b4b29291451abe7a376acc3b1f53d71b (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
# $Id: PKGBUILD 60611 2011-12-14 23:55:11Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>

pkgname=openarena
pkgver=0.8.5
_oldver=0.8.1
pkgrel=4
pkgdesc="A violent, sexy, multiplayer first person shooter based on the ioquake3 engine"
arch=('i686' 'x86_64' 'mips64el')
url="http://openarena.ws/"
license=('GPL')
depends=('sdl' 'libvorbis' 'curl' 'openarena-data')
makedepends=('openal' 'mesa')
optdepends=('openal')
source=(http://download.tuxfamily.org/$pkgname/rel/081/oa081.zip
        http://download.tuxfamily.org/$pkgname/rel/085/oa085p.zip
        $url/svn/source/081/$pkgname-engine-$_oldver-1.tar.bz2
        $pkgname.png
        $pkgname-server.png
        $pkgname.desktop
        $pkgname-server.desktop
        strcpy-memmove.patch)
md5sums=('49006bcb02b4e8ea3d06749e8f4e4887'
         'b2a0437da751cd50dd2351ed9e0c4e9d'
         '4ee696eacc4b0350f9dbb5588dcd74a2'
         'c69f824dc500d436fc631b78b6a62dc8'
         '17e2f4fa060ed97ff6fe1eaff647bcfb'
         '229c87648c10e48b523c25d24aba8372'
         '00649517a4dd08cd9c6e99d6703f01f1'
         '723ec16d949f454588d62da499bbefca')

build() {
    # uncomment to disable semi-nude models:
    # 	rm -f $pkgname-$_oldver/baseoa/pak2-players-mature.pk3
    # (resulting version won't work with most servers!!)

    cd $srcdir/$pkgname-engine-$_oldver

    patch -Np0 < $srcdir/strcpy-memmove.patch
    sed -i 's/#define ALDRIVER_DEFAULT "libopenal.so.0"/#define ALDRIVER_DEFAULT "libopenal.so.1"/g' code/client/snd_openal.c

    make DEFAULT_BASEDIR=/usr/share/$pkgname \
        BUILD_CLIENT_SMP=0 \
        USE_LOCAL_HEADERS=0 \
        GENERATE_DEPENDENCIES=0 \
        OPTIMIZE=
}

package() {
    cd $srcdir/$pkgname-engine-$_oldver

    install -d $pkgdir/usr/{bin,share/{$pkgname,applications,pixmaps}}

    make COPYDIR=$pkgdir/usr/share/$pkgname copyfiles

    [ "$CARCH" = "x86_64" ] && {
        mv -f $pkgdir/usr/share/$pkgname/$pkgname.$CARCH $pkgdir/usr/bin/$pkgname
        mv -f $pkgdir/usr/share/$pkgname/oa_ded.$CARCH $pkgdir/usr/bin/$pkgname-server
    } || {
        mv -f $pkgdir/usr/share/$pkgname/$pkgname.i386 $pkgdir/usr/bin/$pkgname
        mv -f $pkgdir/usr/share/$pkgname/oa_ded.i386 $pkgdir/usr/bin/$pkgname-server
    }

    find $pkgdir/usr/share -type f -exec chmod 644 {} +

    install -m 644 $srcdir/$pkgname{,-server}.png $pkgdir/usr/share/pixmaps/
    install -m 644 $srcdir/$pkgname{,-server}.desktop $pkgdir/usr/share/applications/
}

# vim: sw=2:ts=2 et: