# $Id: PKGBUILD 233248 2015-03-10 07:39:43Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kdemultimedia-kmix
pkgver=14.12.3
pkgrel=1
pkgdesc="KDE volume control program"
url='http://kde.org/applications/multimedia/kmix/'
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdemultimedia')
depends=('kdebase-runtime')
makedepends=('cmake' 'automoc4')
optdepends=('libcanberra-pulse: PulseAudio support')
install="${pkgname}.install"
source=("http://download.kde.org/stable/applications/${pkgver}/src/kmix-${pkgver}.tar.xz"
        'use-qdbus-qt4.patch')
sha1sums=('f5c4fa3c573c9171603580f3b4e666567519f57e'
          'f89a076c5a29c51d213864e27d07baf5400ece03')

prepare() {
  mkdir build

  cd kmix-${pkgver}
  # FS#40786
  patch -p1 -i "${srcdir}"/use-qdbus-qt4.patch
}

build() {
  cd build
  cmake ../kmix-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DKDE4_BUILD_TESTS=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install
}
