#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=kmix
pkgver=3.6
pkgrel=1gv
source=("kdemultimedia-4.4.3.tar.xz" "kmix-only.patch")
docs=("readme" "install" "copying*" "changelog" "authors" "news" "todo")
options=('nosrcpack')

#doinst() {
#
#}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"kmix (change the volume of your sound card)"
"KMix is an application that allows you to change the volume of your"
"sound card. It supports several platforms and sound drivers, including"
"OSS and alsa."
""
"You can also find KMix in the kdemultimedia package."
)


build() {
	cd $startdir/src/kdemultimedia-4.4.3
	
	patch -p1 < $startdir/src/kmix-only.patch || exit 1

	# This avoids compiling a version number into KDE's .la files:
	QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR

	mkdir build
	cd build

	cmake \
		-DCMAKE_C_FLAGS:STRING="$CFLAGS" \
		-DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DMAN_INSTALL_DIR=/usr/man \
		-DSYSCONF_INSTALL_DIR=/etc/kde \
		-DLIB_SUFFIX=${LIBDIRSUFFIX} \
		..
	make || return 1
	make install DESTDIR=$startdir/pkg
}