# Maintainer: David Runge <dvzrv@archlinux.org>

_name=BShapr
_plugin_uri="https://www.jahnichen.de/plugins/lv2/BShapr"
pkgname=bshapr
pkgver=0.13
pkgrel=3
pkgdesc="Beat/ envelope shaper LV2 plugin"
arch=(x86_64)
url="https://github.com/sjaehn/BShapr"
license=(GPL3)
groups=(
  lv2-plugins
  pro-audio
)
depends=(
  cairo
  gcc-libs
  glibc
  libx11
  lv2-host
)
makedepends=(lv2)
checkdepends=(lv2lint)
source=($url/archive/v$pkgver/$_name-$pkgver.tar.gz)
sha512sums=('bf45571d7612e1ecce36d58b79202fc8316cbe01f7e070abe38ef613b0f826ad12ff4944101c6363636f5253178c311788d1027f41aacc01ee4233383f9e8908')
b2sums=('a6953f65c2b31bf064fdcd24458ee27dbb020691b460111e3e5b65b79eeae1af1f64f30cb4e1f595ceaf5a52c905c9de4a41d378fe300cc623a5a424a249538c')

build() {
  make -C $_name-$pkgver
}

check() {
  # upstream doesn't care about validation: https://github.com/sjaehn/BShapr/issues/7
  lv2lint -t "Plugin Version Minor" -t "Plugin Version Micro" -t "UI Symbols" -Mpack -I $_name-$pkgver/$_name.lv2/ "$_plugin_uri"
}

package() {
  make PREFIX=/usr DESTDIR="$pkgdir/" install -C $_name-$pkgver
  install -vDm 644 $_name-$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
