# $Id: PKGBUILD 333813 2018-05-31 02:03:01Z felixonmars $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Bhushan Shah <bshah@kde.org>

pkgname=plasma-maliit-framework
pkgver=0.99.0.20150710
_commit=0e273b3863d3435cfc486cf1aa9dcecfad1e180d
pkgrel=4
pkgdesc="Framework for Maliit integration with Plasma"
arch=('x86_64')
license=('GPL')
url="http://projects.kde.org/plasma-maliit-framework"
depends=('qt5-declarative' 'kwayland' 'karchive')
makedepends=('git')
source=("git+https://github.com/KDE/plasma-maliit-framework.git#commit=$_commit")
sha512sums=('SKIP')

prepare() {
  mkdir -p build
}

build() {
  cd build
  qmake -makefile \
    CONFIG+=qt5-inputcontext \
    CONFIG+=nohwkeyboard \
    CONFIG+=enable-dbus-activation \
    CONFIG+=notests \
    CONFIG+=nodoc \
    ../plasma-maliit-framework
  make
}

package() {
  cd build
  make install INSTALL_ROOT="$pkgdir/"
  mv "$pkgdir"/usr/include/maliit/framework/maliit/* "$pkgdir"/usr/include/maliit/
  mv "$pkgdir"/usr/include/maliit/plugins/maliit/plugins/* "$pkgdir"/usr/include/maliit/plugins/
  rm -r "$pkgdir"/usr/include/maliit/plugins/maliit "$pkgdir"/usr/include/maliit/framework
}
