summaryrefslogtreecommitdiff
path: root/community/supertuxkart/PKGBUILD
blob: 19fb3bf3c5dc4ad416ffdc336db618fc0b67b489 (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
# $Id: PKGBUILD 65315 2012-02-20 23:23:12Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: rabyte <rabyte__gmail>

pkgname=supertuxkart
pkgver=0.7.3
pkgrel=2
pkgdesc="A kart racing game featuring Tux and his friends"
arch=('i686' 'x86_64')
url="http://supertuxkart.sourceforge.net/"
license=('GPL2')
depends=('openal' 'libvorbis' 'libgl' 'fribidi' 'curl')
makedepends=('cmake' 'subversion' 'mesa')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.bz2)
md5sums=('502664b2ec9ad5ab88b1882fef4c074d')

build() {
  cd "$srcdir"

  svn co -r 3900 https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk irrlicht

  cd irrlicht/source/Irrlicht
  NDEBUG=1 make

  cd ${srcdir}/${pkgname}-${pkgver}

  sed -i "s|share/games|share|g" CMakeLists.txt

  [[ -d build ]] && rm -r build
  mkdir build && cd build

  cmake \
    -DIRRLICHT_DIR="$srcdir/irrlicht" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_CXX_FLAGS="-lpthread -lm -ldl" \
    ..

  make
}

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

  cd build
  make DESTDIR=${pkgdir} install

  # fix executable location...
  install -Dm755 ${pkgdir}/usr/games/supertuxkart ${pkgdir}/usr/bin/supertuxkart
  rm -r ${pkgdir}/usr/games

  sed -i "s#usr/games/supertuxkart#usr/bin/supertuxkart#" ${pkgdir}/usr/share/applications/supertuxkart.desktop
}

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