PKGBUILDs/community/nexuiz/PKGBUILD
2009-10-09 21:15:33 -05:00

55 lines
2.2 KiB
Bash

# Maintainer: Xyne
# Contributor: Rick Chen (stuffcorpse)
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: Camille Moncelier <pix@devlife.org>
pkgname=nexuiz
pkgver=2.5.2
_zipver=252
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="a free, open-source first person shooter"
url="http://www.nexuiz.com/"
license=("GPL")
depends=('alsa-lib' 'curl' 'libjpeg>=7' 'libmodplug' 'libvorbis' 'libxpm' 'libxxf86dga' 'libxxf86vm' 'sdl' 'nexuiz-data')
makedepends=('mesa')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_zipver}.zip \
nexuiz-dedicated nexuiz-glx nexuiz-sdl nexuiz-glx.desktop \
nexuiz-libjpeg-fix.patch
nexuiz-sdl.desktop nexuiz.png)
md5sums=('d750bc328e58df8492f8d88bdcf818cb'
'19bfaa6e891d3309783e8366db485474'
'4d0ee9282a6fe153f82f7797decfd585'
'3e5ea741e8d55df8e7691c797c81ffa7'
'310f0577c39391f2d2f17cea446ce269'
'6bd02f1b6f5f46f8d517c4d5dab8e11f'
'4561d3c5be4801399af515faf82ebcba'
'442fb62670bbe0a1b5370461052051a3')
build() {
_nexdir="$pkgdir/opt/nexuiz"
_enginesource_date="20091001"
mkdir -p "$_nexdir" || return 1
cd $srcdir/Nexuiz
bsdtar -x -f sources/enginesource${_enginesource_date}.zip || return 1
cd darkplaces
patch -p1 < "$srcdir/nexuiz-libjpeg-fix.patch" || return 1
# here's a working kludge to build all three binaries at once but don't use it ;)
# make CPUOPTIMIZATIONS="${CFLAGS}" nexuiz || make CPUOPTIMIZATIONS="${CFLAGS}" nexuiz || return 1
# build the binaries separately instead to avoid truncated files
make CPUOPTIMIZATIONS="${CFLAGS}" cl-nexuiz || return 1
make CPUOPTIMIZATIONS="${CFLAGS}" sdl-nexuiz || return 1
make CPUOPTIMIZATIONS="${CFLAGS}" sv-nexuiz || return 1
# install the compiled binaries
install -Dm755 nexuiz-glx nexuiz-sdl nexuiz-dedicated -t $_nexdir || return 1
install -dm755 $pkgdir/usr/{bin,share/applications} || return 1
install -Dm755 $srcdir/nexuiz-{glx,sdl,dedicated} -t $pkgdir/usr/bin || return 1
install -Dm644 $srcdir/*.desktop -t $pkgdir/usr/share/applications || return 1
install -Dm644 $srcdir/nexuiz.png $pkgdir/usr/share/pixmaps/nexuiz.png || return 1
}