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

pkgname=naev
pkgver=0.13.3
pkgrel=2
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=('67c9b5674db9d19e4f0d8d26fd81647a2dbdc70e628151738c18e96600be3196d946ad67f65c41f73828f2c0a6b2b9350fb1ad80f3ad4fb749e0a9feeaf099ae')
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
}
