# $Id: PKGBUILD 116117 2014-07-22 17:06:27Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
pkgname=openra
pkgver=20140722
pkgrel=1
pkgdesc="An open-source implementation of the Red Alert engine using .NET/mono and OpenGL"
arch=('any')
url="http://open-ra.org"
license=('GPL3')
install=openra.install
depends=('mono' 'ttf-dejavu' 'openal' 'libgl' 'freetype2' 'sdl2' 'lua51' 'hicolor-icon-theme' 'gtk-update-icon-cache' 'desktop-file-utils' 'xdg-utils' 'zenity')
makedepends=('git' 'unzip')
optdepends=('nvidia-cg-toolkit: for using the alternative Cg renderer')
options=(!strip)
source=("git+https://github.com/OpenRA/OpenRA.git#tag=release-${pkgver}")
md5sums=('SKIP')

prepare() {
  cd OpenRA

  make version
}

build() {
  cd OpenRA

  ./configure
  make cli-dependencies
  make core
  make tools
}

package() {
  cd OpenRA

  make prefix=/usr DESTDIR="$pkgdir" install-all
  make prefix=/usr DESTDIR="$pkgdir" install-linux-shortcuts
}
