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

pkgname=naev
pkgver=0.13.2
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=('ccb9dc8b92186ccf777be643e55a947c0026039f1f8c139cd3f6bb1310a83a3a53358d5ea99b172690a62c4aefb1bf15d5b6a93daf8cd2eb912b1a6866a07b48')
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
}
