# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=libretro-melonds
pkgver=560
pkgrel=1
pkgdesc='Nintendo DS core'
arch=(x86_64)
url='https://github.com/libretro/melonDS'
license=(GPL2)
groups=(libretro)
depends=(libretro-core-info)
makedepends=(git)
_commit='f3a42da78908edf4500055f4cb895e144094643d'
source=(libretro-melonds::git+https://github.com/libretro/melonDS.git#commit=${_commit})
sha256sums=('SKIP')

pkgver() {
  cd libretro-melonds

  git rev-list --count HEAD
}

build() {
  cd libretro-melonds

  export LDFLAGS="$LDFLAGS -lpthread"

  make
}

package() {
  cd libretro-melonds

  install -Dm 644 melonds_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
