#Maintainer: Thorsten Muehlfelder <thenktor@gmx.de>

# Mandatory
pkgname=amarok
pkgver=2.1.1
pkgrel=1tm
arch=i686
source=("http://download.kde.org/download.php?url=stable/amarok/$pkgver/src/amarok-$pkgver.tar.bz2")
sourcetemplate=http://thenktor.dyndns.org/packages/$pkgname/
url="http://amarok.kde.org/"

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname - A music player"
"Amarok is the music player for Linux and Unix with an intuitive"
"interface. Amarok makes playing the music you love easier than ever"
"before - and looks good doing it."
)

build() {
	cd $startdir/src/
	mkdir build
	cd build
	export CMAKE_LIBRARY_PATH=/usr/lib/mysql:$CMAKE_LIBRARY_PATH
	export CMAKE_INCLUDE_PATH=/usr/include/mysql:$CMAKE_INCLUDE_PATH

	cmake \
		-DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` \
		-DCMAKE_BUILD_TYPE=Release \
		-DMAN_INSTALL_DIR=/usr/man \
		-DSYSCONF_INSTALL_DIR=/etc/kde \
		$startdir/src/$pkgname-$pkgver/

	LANG=en_US.utf8 make -j3 || return 1
	make DESTDIR=$startdir/pkg/ install
}

doinst() {
	if [ -x /usr/bin/update-desktop-database ]; then
		/usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
	fi
}
