summaryrefslogtreecommitdiff
path: root/community-testing/vdrift/PKGBUILD
blob: e6950ad00be00335f595ba6a1d6fb2af553c204d (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
# $Id: PKGBUILD 55771 2011-09-20 02:23:49Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Lone_Wolf lonewolf@xs4all.nl

pkgname=vdrift
pkgver=2011.09.01
pkgrel=3
pkgdesc="An open source driving simulation made with drift racing in mind"
arch=('i686' 'x86_64')
url="http://vdrift.net/"
license=('GPL')
depends=('bullet' 'curl' 'sdl_gfx' 'sdl_image' 'glew' 'libvorbis' 'vdrift-data')
makedepends=('scons' 'boost' 'asio')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-src-${pkgver//./-}.tar.bz2
        $pkgname.desktop)
md5sums=('a4099acacca3d4f0799b012cd168f1c0'
         '8bb429f37bcb4aed5e7ab1d80c5a4f93')

build() {
  cd "$srcdir"/$pkgname-src-${pkgver//./-}

  # select arch
  if [ `uname -m` = "x86_64" ]; then
    _sconsarch="a64"
  else
    _sconsarch="686"
  fi

  sed -i 's/glGenerateMipmap/glGenerateMipmapEXT/g' src/texture.cpp
  sed -i '/types.h/d' src/http.h

  # build and install
  scons \
    "destdir"="$pkgdir" \
    "arch"=$_sconsarch \
    "release"=1 \
    "force_feedback"=1 \
    "prefix"=/usr \
    "datadir"=share/$pkgname/
}

package() {
  cd "$srcdir"/$pkgname-src-${pkgver//./-}

  scons install

  # install .desktop file
  install -Dm644 ../$pkgname.desktop \
    "$pkgdir"/usr/share/applications/$pkgname.desktop
}
# vim: sw=2:ts=2 et: