updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / darkplaces / PKGBUILD
blobc1d47e5d83d372471b5c81dd350d1daf9a3d6d16
1 # Maintainer: Arkham <arkham at archlinux dot us>
2 # Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
3 # Contributor: Paul Bredbury <brebs@sent.com>
5 pkgname=darkplaces
6 pkgver=20110628
7 pkgrel=2
8 pkgdesc="An advanced Quake 1 game engine"
9 arch=('i686' 'x86_64')
10 url="http://icculus.org/twilight/darkplaces/"
11 license=('GPL2')
12 depends=('alsa-lib' 'libjpeg6' 'libxpm' 'libxxf86vm' 'libxxf86dga' 'sdl')
13 makedepends=('xextproto' 'xf86dgaproto' 'xf86vidmodeproto' 'xproto')
14 install=$pkgname.install
15 source=(http://icculus.org/twilight/$pkgname/files/darkplacesengine$pkgver.zip
16         $pkgname.desktop)
17 md5sums=('c42103732cedfcf385ee959db9db6cb4'
18          '31dd47a4969ad5d9d0e1c59db1d0e1e2')
20 build() {
21     # Extract the package
22     cd $srcdir
23     bsdtar -xf darkplacesenginesource$pkgver.zip || return 1
25     # Make sure Darkplaces is not compiled with -j > 1.
26     MAKEFLAGS="${MAKEFLAGS} -j1"
28     # Compile
29     cd $pkgname
30     sed -i -e '1i DP_LINK_TO_LIBJPEG=1' makefile
31     make OPTIM_RELEASE="${CFLAGS}" DP_FS_BASEDIR=/usr/share/quake release || return 1
33     # Install binary, icon and desktop files
34     install -d $pkgdir/usr/{bin,share/quake}
35     install -m 755 darkplaces-{dedicated,glx,sdl} $pkgdir/usr/bin/
37     for i in 16 24 32 48 64 72 ; do
38         install -Dm 644 darkplaces${i}x$i.png $pkgdir/usr/share/icons/hicolor/${i}x$i/apps/darkplaces.png
39     done
41     install -Dm 644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop