# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Panagiotis Papadopoulos

pkgname=wildmidi
pkgver=0.4.6
pkgrel=1
pkgdesc='Simple software MIDI player which has a core softsynth library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/Mindwerks/wildmidi'
license=('GPL-3.0-or-later AND LGPL-3.0-or-later')
depends=('alsa-lib' 'glibc')
makedepends=('cmake' 'ninja')
source=("https://github.com/Mindwerks/wildmidi/archive/$pkgname-$pkgver.tar.gz")
sha256sums=('051b8c51699af594ddd3e4e3b06bad3564e9499c3c6b9e6f880cb2f92bcfa9c8')

build() {
  cmake -S $pkgname-$pkgname-$pkgver -B build -G Ninja -DCMAKE_INSTALL_PREFIX='/usr'
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  ln -s wildmidi.pc "$pkgdir/usr/lib/pkgconfig/WildMIDI.pc"
}
