### this file is sourced not run
PKGVER=1.1.11
PKGBUILD=1
PKGARCH=x86_64

# source: james/debian
TARBALL=fluidsynth_$PKGVER.orig.tar.gz
MD5SUM=1d84d844b2f76df2292f31e7263d00db
SRC_URL=http://ftp.de.debian.org/debian/pool/main/f/fluidsynth/$TARBALL
BUNDLE=

SLACKREQ='alsa-lib libjack2 libreadline libsndfile' # 
SLACKDESC="fluidsynth: fluidsynth $PKGVER (MIDI synthesizer)"'
fluidsynth:  
fluidsynth: Fluidsynth is a real-time midi synthesizer based on the soundfont2 
fluidsynth: specifications. It can be used to render MIDI input or MIDI files 
fluidsynth: to audio. The MIDI events are read from a MIDI device. The sound 
fluidsynth: is rendered in real-time to the sound output device.  
fluidsynth: 
fluidsynth: 
fluidsynth: 
fluidsynth: 
fluidsynth:
'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cp $CHROOT_DIR/tmp/pkg/ladspa.h usr/include &&
	cd tmp/fluidsynth* &&
	tar -xf $CHROOT_DIR/tmp/pkg/fluidsynth_$PKGVER-1.debian.tar.xz &&
	for p in $(cat debian/patches/series); do 
		patch -Np1 -i debian/patches/$p
	done
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/fluidsynth* &&
	cmake . -DCMAKE_INSTALL_PREFIX=/usr \
            -DCMAKE_BUILD_TYPE=Release \
            -Denable-ladspa=ON \
			-DLIB_SUFFIX="64" &&
	make $MAKEFLAGS &&
	make install &&
	pkg_build_slackdesc &&
	rm -f /usr/include/ladspa.h
}
