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

# source: james
TARBALL=fluidsynth_$PKGVER.tar.gz
MD5SUM=02e59e3689b6121c1c9e920f5d05c699
SRC_URL=https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v$PKGVER.tar.gz
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: https://www.fluidsynth.org/
fluidsynth32: https://github.com/FluidSynth/fluidsynth/
'

### 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() {
	cd /tmp/fluidsynth* &&
	cp ../pkg/ladspa.h /usr/include &&	
	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
}
