# $Id: PKGBUILD 240133 2015-06-02 07:17:24Z arojas $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Antonio Rojas <arojas@archlinux.org>

pkgname=telepathy-kde-accounts-kcm
_pkgname=ktp-accounts-kcm
pkgver=15.04.2
pkgrel=1
pkgdesc='KCM Module for configuring Telepathy Instant Messaging Accounts'
arch=('i686' 'x86_64')
url='http://community.kde.org/Real-Time_Communication_and_Collaboration'
license=('GPL')
groups=('kde-applications' 'kdenetwork' 'telepathy-kde')
depends=('telepathy-qt5' 'kaccounts-integration')
makedepends=('extra-cmake-modules' 'intltool')
optdepends=('telepathy-gabble: XMPP/Jabber accounts support' 'telepathy-haze: account types supported by Pidgin/libpurple')
source=("http://download.kde.org/stable/applications/${pkgver}/src/$_pkgname-${pkgver}.tar.xz")
md5sums=('e6591884e2d78674bdb5e398368135d5')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$_pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DLIB_INSTALL_DIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  make
}

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