# Contributor (Arch): Jon Nordby <jononor@gmail.com>
# Maintainer (Arch): Jon Nordby <jononor@gmail.com>
# Contributor: André Silva <emulatorman@hyperbola.info>

# parabola changes and rationale:
#  upstream pkgbuild is gone, but we keep maintaining this.

pkgname=maliit-framework
pkgver=0.99.1
pkgrel=1
pkgdesc="Maliit Input Methods - Framework"
arch=('x86_64' 'i686' 'armv7h')
url="http://maliit.org"
license=('LGPL')
depends=('qt5-base' 'qt5-quick1' 'gtk2' 'gtk3' 'gconf')
install=$pkgname.install
source=($pkgname-$pkgver.tar.gz::https://github.com/maliit/framework/archive/$pkgver.tar.gz)
md5sums=('79b785925506838c95e06cb9517b688f')

build() {
  cd "framework-$pkgver"

  # BUILD
  qmake -r .
  make
}

package() {
  cd "framework-$pkgver"
  make INSTALL_ROOT="$pkgdir" GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 install

  install -m755 -d "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain maliit-framework "$pkgdir"/etc/gconf/schemas/*.schemas
  rm -f "$pkgdir"/etc/gconf/schemas/*.schemas
} 
