### this file is sourced not run
PKGVER=2.1.0
PKGBUILD=1
PKGARCH=x86_64
PKGNAME=linuxsampler

# source: james
TARBALL=linuxsampler-$PKGVER.tar.bz2
MD5SUM=c57fbd1310e9189ee72acf81e63bf3d5
SRC_URL=http://download.linuxsampler.org/packages/$TARBALL
BUNDLE=

SLACKREQ='libgig libjack2 dssi liblilv libsuil libsndfile sqlite3' # 
SLACKDESC="linuxsampler: linuxsampler $PKGVER (Audio Sampler)
linuxsampler: 
linuxsampler: The LinuxSampler project was founded in 2002 with the goal to produce 
linuxsampler: a free, streaming capable open source pure software audio sampler 
linuxsampler: with high stability, efficiency and very low latency, providing 
linuxsampler: professional grade features, comparable to both hardware and 
linuxsampler: commercial Windows/Mac software samplers and to introduce new 
linuxsampler: features not yet available by any other sampler in the world.
linuxsampler: 
linuxsampler: http://www.linuxsampler.org/
linuxsampler: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	ldconfig # make sure temp-installed libs are updated

	CONFFLAGS="$CONFFLAGS --disable-static"	
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# these notes are from Arch PKGBUILD
	# lscp files conflict with nilfs-utils
	# see https://bugs.archlinux.org/task/45827
	mv "/usr/bin/lscp" "/usr/bin/lscp-${PKGNAME}" &&
	mv "/usr/share/man/man1/lscp.1" "/usr/share/man/man1/lscp-${PKGNAME}.1" &&

	# fix linking of /usr/lib/linuxsampler/liblinuxsampler.so.5.0.0
	install -d "/etc/ld.so.conf.d" &&
	echo "/usr/$LIBDIR/${PKGNAME}" > "${pkgdir}/etc/ld.so.conf.d/${PKGNAME}.conf" &&
	
	# clean ld.so cache
	rm -rf /var/cache /etc/ld.so.cache
}
