#Maintainer: Dimitris Tzemos <djemos~at~slackel~dot~gr>

pkgname=SDL2_mixer
pkgver=2.0.1
pkgrel=1dj
source=("http://www.libsdl.org/projects/SDL_mixer/release/$pkgname-$pkgver.tar.gz")
sourcetemplate=http://people.salixos.org/djemos/salix/$pkgname
#docs=()
url="http://www.libsdl.org/projects/SDL_mixer"

slackdesc=\
(
 #|-----handy-ruler------------------------------------------------------|
"SDL2_mixer (sample multi-channel audio mixer library)"
"SDL_mixer is a sample multi-channel audio mixer library. It supports"
"any number of simultaneously playing channels of 16-bit stereo audio,"
"plus a single channel of music."
""
"Homepage: http://www.libsdl.org/projects/SDL_mixer/"
)

build() {
	cd $SRC/$pkgname-$pkgver
    
	sed -i "s|/etc/timidity|/etc/timidity++|g" timidity/config.h
	sed -i "s|/etc/timidity++.cfg|/etc/timidity++/timidity.cfg|g" timidity/config.h
	./configure \
	  --prefix=/usr \
	  --libdir=/usr/lib${LIBDIRSUFFIX} \
	  --sysconfdir=/etc \
	  --localstatedir=/var \
	  --mandir=/usr/man \
	  --docdir=/usr/doc/$pkgname-$pkgver \
	  --enable-static=no \
	  --enable-music-mod-modplug=no \
	  --build=$arch-slackware-linux

	make || return 1
	make install DESTDIR=$PKG  || return 1
	rm $PKG/usr/lib${LIBDIRSUFFIX}/libSDL2_mixer.la
}