summaryrefslogtreecommitdiff
path: root/community/vdrift/PKGBUILD
blob: f30ed8bdb82fd2c04e81a9b511a9d9004cf058e6 (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
# $Id: PKGBUILD 78854 2012-10-26 01:19:11Z ebelanger $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Lone_Wolf lonewolf@xs4all.nl

pkgname=vdrift
pkgver=2012.07.22
pkgrel=2
pkgdesc="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=2:$pkgver"
         'gtk-update-icon-cache' 'hicolor-icon-theme' 'libarchive')
makedepends=('scons' 'boost' 'asio' 'mesa')
install=vdrift.install
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-${pkgver//./-}.tar.bz2
        vdrift-2012-07-22c_bullet281_patch.diff)
md5sums=('fcfd6b65724d32dfe383df216d7afb74'
         '67ff3037575c3aa74393971d1475ef54')

build() {
  cd VDrift

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

  patch -Np0 < "$srcdir"/vdrift-2012-07-22c_bullet281_patch.diff

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

package() {
  cd VDrift

  scons install

  # install .desktop file
  install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
  sed -i '1 s/^\xef\xbb\xbf//' "$pkgdir"/usr/share/applications/$pkgname.desktop # remove BOM (WHY IS THERE?)

  # install icons
  install -Dm644 data/textures/icons/vdrift-16x16.png "$pkgdir"/usr/share/icons/hicolor/16x16/apps/vdrift.png
  install -Dm644 data/textures/icons/vdrift-32x32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/vdrift.png
  install -Dm644 data/textures/icons/vdrift-64x64.png "$pkgdir"/usr/share/icons/hicolor/64x64/apps/vdrift.png
  install -Dm644 data/textures/icons/vdrift-64x64.png "$pkgdir/usr/share/pixmaps/$pkgname.png"

  rm -r "$pkgdir"/usr/share/vdrift
}
# vim: sw=2:ts=2 et: