# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: Johan Rehnberg <cleanrock@gmail.com>

pkgname=naev
pkgver=0.13.0
pkgrel=1
pkgdesc='2D action/rpg space game'
arch=('x86_64')
url="https://codeberg.org/naev/naev"
license=('GPL3')
depends=('glu' 'openal' 'libvorbis' 'sdl3' 'libgl' 'libxml2' 'freetype2' 'libpng' 'libzip'
         'luajit' 'glpk' 'physfs' 'libunibreak' 'suitesparse' 'openblas' 'cmark' 'enet'
         'opus' 'dav1d')
makedepends=('freeglut' 'zip' 'meson' 'git' 'python-yaml' 'rust' 'rust-bindgen')
source=("https://codeberg.org/naev/naev/releases/download/v${pkgver}/naev-${pkgver}-source.tar.xz")
sha512sums=('a6e4bcabe480f5bac00db6598f5416b9f484feb61c526970b2dd46ebc7aea1284bf4b228dd49a892ff358df576533acca665fc5e38e3182b5673165dd1a2744c')
options=('!lto')

build() {
  cd "$pkgname-$pkgver"

  meson setup --buildtype=release -Dprefix=/usr -Dndata_path=/usr/share/naev/ndata build .
  cd build
  meson compile
}

package() {
  cd "$pkgname-$pkgver/build"

  DESTDIR="$pkgdir" meson install
}
