# Maintainer : David Runge <dave@sleepmap.de>
# Contributor: speps <speps at aur dot archlinux dot org>
# Contributor: Alessio Biancalana <dottorblaster@gmail.com>

pkgname=amsynth
pkgver=1.9.0
pkgrel=1
pkgdesc="Analogue Modeling SYNTHesizer"
arch=('x86_64')
url="https://amsynth.github.io/"
license=('GPL2')
groups=('dssi-plugins' 'lv2-plugins' 'pro-audio' 'vst-plugins')
depends=('gtk2' 'jack' 'liblo')
makedepends=('dssi' 'ladspa' 'lv2' 'intltool' 'pandoc')
source=("https://github.com/amsynth/amsynth/releases/download/release-${pkgver}/amsynth-${pkgver}.tar.bz2")
sha512sums=('4600c0ca8ee2cfecdbaa272bf9a29a29386b04081fe2b75fa3d12c7d53c75a32803f30d1822c36db64009f8c38258f2e22c4e59210b882de0568d5241c623965')

prepare() {
  cd "${pkgname}-${pkgver}"
  autoreconf -vfi
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
    --with-alsa \
    --with-jack \
    --with-sndfile \
    --with-dssi \
    --with-lv2 \
    --with-vst \
    --with-pandoc
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="$pkgdir/" install
  install -vDm 644 {AUTHORS,NEWS,README} \
    -t "${pkgdir}/usr/share/doc/${pkgname}/"
}
