# Maintainer:
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Simon Perry <aur [at] sanxion [dot] net>
# Contributor: Jonas Nyrén <jonas.nyren*mindkiller.com>

pkgname=libsidplayfp
pkgver=2.3.0
pkgrel=1
pkgdesc='Library to play Commodore 64 music, derived from libsidplay2'
url='https://github.com/libsidplayfp/libsidplayfp'
arch=(x86_64)
license=(GPL)
makedepends=(vice xa)
optdepends=('vice: better SID support')
source=("https://downloads.sourceforge.net/project/sidplay-residfp/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('30b91b2b9a3a644533c8e4e926724efb8b4cf06aded1fcec4c68aa21159b8673')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  DESTDIR="$pkgdir" make -C $pkgname-$pkgver install
  install -d "$pkgdir/usr/share/sidplayfp"
  ln -t "$pkgdir/usr/share/sidplayfp" -s /usr/share/vice/C64/{kernal,basic,chargen}
}
