PKGBUILD 1.43 KB
Newer Older
1 2 3 4 5 6 7
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>

pkgname=flightgear
_pkgname=FlightGear
Adrián Chaves (Gallaecio)'s avatar
Adrián Chaves (Gallaecio) committed
8
pkgver=2.12.0
Adrián Chaves (Gallaecio)'s avatar
Adrián Chaves (Gallaecio) committed
9
pkgrel=1
10 11
pkgdesc="An open-source, multi-platform flight simulator."
arch=(i686 x86_64)
12
depends=('libxmu' 'libxi' 'openal' 'openscenegraph' 'zlib' 'simgear' 'subversion')
abveritas's avatar
abveritas committed
13
makedepends=('boost' 'cmake')
14
optdepends=('flightgear-aircrafts: Additional aircrafts.')
15
license=(GPL3)
16
url="http://www.flightgear.org"
17
screenshot="http://www.flightgear.org/wp-content/gallery/gallery-v2-6/737-300_egkk_hom.jpg"
Giuseppe's avatar
Giuseppe committed
18
categories=('games')
abveritas's avatar
abveritas committed
19
source=(http://ftp.icm.edu.pl/packages/$pkgname/Source/$pkgname-$pkgver.tar.bz2)
Adrián Chaves (Gallaecio)'s avatar
Adrián Chaves (Gallaecio) committed
20
sha256sums=('84499d1b2a6c3c801a3c163f4f40d1f55b5fbcd4b65259fc5e5d5aa12e513341')
21 22

build() {
23
  cd $srcdir/$pkgname-$pkgver
24 25 26 27 28 29 30 31
  
  mkdir -p build
  cd build
  
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    ..
    
32 33 34 35
  make
}

package() {
36 37 38 39
  depends=( "${depends[@]}" "flightgear-data" )

  cd $srcdir/$pkgname-$pkgver/build
  
40 41
  make DESTDIR=$pkgdir install

42 43
  # Execution script.
  echo "#!/bin/bash"	 > $pkgdir/usr/bin/$pkgname
44
  echo "fgfs --fg-root=/usr/share/$pkgname/data \$@"	>> $pkgdir/usr/bin/$pkgname
45
  chmod +x $pkgdir/usr/bin/$pkgname
46 47 48
  
  # Desktop Integration.
  cd .. # From /build
49 50
  install -Dm0644 package/$pkgname.desktop    $pkgdir/usr/share/applications/$pkgname.desktop
  install -Dm0644 package/$pkgname.ico        $pkgdir/usr/share/icons/$pkgname.ico
51
}