# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=calf
pkgver=0.90.3
pkgrel=2
pkgdesc="Calf Studio Gear"
url="https://calf-studio-gear.org"
arch="all"
license="GPL-2.0-only AND LGPL-2.1-only"
makedepends="autoconf automake expat-dev fluidsynth-dev gtk+2.0-dev jack-dev
	libtool lv2-dev"
subpackages="$pkgname-static $pkgname-jack $pkgname-doc $pkgname-lv2"
source="http://calf-studio-gear.org/files/calf-$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

jack() {
	pkgdesc="Calf Studio Gear (JACK utils)"
	amove usr/bin/calfjackhost
}

lv2() {
	pkgdesc="Calf Studio Gear (LV2 plugins)"
	amove usr/lib/lv2/*
}

sha512sums="a17be4f2e753c5426ff6995ebf4e88f1d4916629f624fcb576e09e5cafd56474fc8944d9defba31561a3476c55d78dd69189cedb11197a09cc3af6e59aa2a867  calf-0.90.3.tar.gz"
