### this file is sourced not run
PKGVER=1.9.21 # from 1.9.22 onwards, the example tools are in separate project called https://github.com/jackaudio/jack-example-tools
PKGBUILD=1
PKGARCH=i686

### NOTE: THIS PACKAGE DOES NOT USE OF CONFFLAGS!!!

# source: james
TARBALL=jack2-$PKGVER.tar.gz
MD5SUM=48515d41a3e8de2464efc583d2b9a596
SRC_URL=https://github.com/jackaudio/jack2/archive/v$PKGVER.tar.gz
BUNDLE=

SLACKREQ='libsndfile32 libsamplerate32 alsa-lib32'
SLACKDESC="libjack2_32: jack2_32 $PKGVER (Jack audio library)  
libjack2_32:  
libjack2_32: JACK is system for handling real-time, low latency audio (and MIDI). 
libjack2_32: JACK was designed from the ground up for professional audio work, and 
libjack2_32: its design focuses on two key areas: synchronous execution of all 
libjack2_32: clients, and low latency operation.  
libjack2_32: 
libjack2_32: This contains 32-bit version of the library
libjack2_32: 
libjack2_32: 
libjack2_32:
"

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	! [ -e /usr/bin/env ] && ln -s /tools/bin/env /usr/bin
	cd /tmp/jack* &&
	#sh < /dev/tty
	./waf configure --prefix=/usr --libdir=/usr/$LIBDIR --alsa --autostart=none --example-tools &&
	./waf build $MAKEFLAGS &&
	./waf install &&
	pkg_build_slackdesc &&

	# move doc dir to the right place
	#mv /usr/share/jack-audio-connection-kit /usr/share/doc &&
	
	rm -f /usr/bin/env
}
