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

# source: james
TARBALL=swami-2018.12.tar.bz2
MD5SUM=8064b90e235d359beae43a1c7b37b5a3
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ='gtk2 fluidsynth libsndfile libfftw3f' # 
SLACKDESC="swami: swami $PKGVER (Soundfont Editor)
swami: 
swami: Project SWAMI, Sampled Waveforms And Musical Instruments, is a 
swami: collection of free software for editing, managing and playing musical 
swami: instruments for MIDI music composition. This package contains swami 
swami: and libinstpatch.
swami: 
swami: http://www.swamiproject.org/
swami: 
swami: 
swami:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/swami* &&
	patch -Np1 -i ../pkg/ftbfs.patch
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/swami*
	
	# build libinstpatch
	cd libinstpatch &&
	autoreconf -fi && ./configure $CONFFLAGS --libdir=/usr/$LIBDIR &&
	make $MAKEFLAGS && make install &&
	
	# build swami proper
	cd ../swami &&
	mkdir build && cd build &&
	cmake .. $CMAKEFLAGS -DPLUGINS_DIR=/usr/$LIBDIR/swami && 
	make $MAKEFLAGS && make install &&
	
	pkg_build_slackdesc
}
