# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
pkgname=openra
pkgver=20210321
pkgrel=1
pkgdesc="An open-source implementation of the Red Alert engine using .NET/Mono and OpenGL"
arch=('any')
url="https://www.openra.net"
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' 'mono-msbuild')
options=(!strip)
source=("git+https://github.com/OpenRA/OpenRA.git#tag=release-${pkgver}")
md5sums=('SKIP')

prepare() {
  cd OpenRA

  make version VERSION="release-${pkgver}"
}

build() {
  cd OpenRA

  make TARGETPLATFORM=unix-generic
}

package() {
  cd OpenRA

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