# Template file for 'jack'
pkgname=jack
version=1.9.8
build_wrksrc=${pkgname}-${version}
build_style=waf
revision=2
configure_args="--alsa --classic --dbus"
# XXX libffado (firewire)
subpackages="lib$pkgname $pkgname-devel"
makedepends="python pkg-config libsamplerate-devel readline-devel ncurses-devel alsa-lib-devel dbus-devel expat-devel libsndfile-devel celt-devel"
short_desc="JACK Audio Connection Kit low-latency sound server (pro audio)"
maintainer="davehome <davehome@redthumb.info.tm>"
license="GPL-2, LGPL-2.1"
homepage="http://jackaudio.org/"
distfiles="http://www.grame.fr/~letz/${pkgname}-${version}.tgz"
checksum=4c712eac54bdf5b4c0245f728654459d0437e5cdab84e7ac633be6fe4502081d
long_desc="
 JACK is system for handling real-time, low latency audio (and MIDI). It runs
 on GNU/Linux, Solaris, FreeBSD, OS X and Windows (and can be ported to other
 POSIX-conformant platforms). It can connect a number of different
 applications to an audio device, as well as allowing them to share audio
 between themselves. Its clients can run in their own processes (ie. as normal
 applications), or can they can run within the JACK server (ie. as a plugin).
 JACK also has support for distributing audio processing across a network,
 both fast and reliable LANs as well as slower, less reliable WANs.

 JACK was designed from the ground up for professional audio work, and its
 design focuses on two key areas: synchronous execution of all clients, and
 low latency operation."

post_install() {
	# pam_limits(8) support
	vinstall ${FILESDIR}/jack-limitsd.conf \
		644 etc/security/limits.d jack.conf
	# audio group permissions for realtime
	vinstall ${FILESDIR}/40-hpet-permissions.rules \
		644 usr/lib/udev/rules.d
}
