# Maintainer: lemonxah <lemonxah@gmail.com>
# Zestins: ZestBay's own LV2 plugins, built from the zestins/ folder of the
# ZestBay repository.
pkgname=zestins-git
pkgver=r0.0000000
pkgrel=1
pkgdesc="LV2 plugins from ZestBay: utility, meter, EQ, gate, compressor, delay, reverb, tone generator, synth and MIDI tools (git version)"
arch=('x86_64')
url="https://github.com/lemonxah/zestbay"
license=('MIT')
groups=('lv2-plugins' 'pro-audio')
depends=('glibc' 'libx11')
makedepends=('lv2' 'pkgconf' 'git')
optdepends=('zestbay: PipeWire patchbay that hosts these plugins')
provides=('zestins')
conflicts=('zestins')
source=("zestbay::git+https://github.com/lemonxah/zestbay.git")
sha256sums=('SKIP')

pkgver() {
  cd zestbay
  printf "r%s.%s" "$(git rev-list --count HEAD -- zestins)" "$(git rev-parse --short HEAD)"
}

build() {
  cd zestbay/zestins
  make
}

package() {
  cd zestbay/zestins
  make install DESTDIR="$pkgdir" LV2_DIR=/usr/lib/lv2
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
