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

# 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-lib32 libjack2_32 libreadline32 libsndfile32' # 
SLACKDESC="fluidsynth32: fluidsynth32 $PKGVER (MIDI synthesizer)"'
fluidsynth32:  
fluidsynth32: Fluidsynth is a real-time midi synthesizer based on the soundfont2 
fluidsynth32: specifications. It can be used to render MIDI input or MIDI files 
fluidsynth32: to audio. The MIDI events are read from a MIDI device. The sound 
fluidsynth32: is rendered in real-time to the sound output device.  
fluidsynth32: 
fluidsynth32: This contains 32-bit version of the library.
fluidsynth32: 
fluidsynth32: 
fluidsynth32:
'

### 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
}

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

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