# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: Doug Newgard <scimmia at archlinux dot info>

pkgname=qmltermwidget
pkgrel=3
pkgver=0.2.0
pkgdesc='QML port of qtermwidget'
arch=('x86_64')
url='https://github.com/Swordfish90/qmltermwidget'
license=('GPL')
depends=('qt5-declarative')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Swordfish90/qmltermwidget/archive/$pkgver.tar.gz"
        https://github.com/Swordfish90/qmltermwidget/pull/27.patch
        https://github.com/Swordfish90/qmltermwidget/pull/31.patch)
sha512sums=('544d57296de6999b86bf2b921d1d93ac5d7eddd02eea436df4ecea0966c82389e716310fd7e4d13dd918bc1b3fd2d02f953c713dc5b4abcfc56d3f3f617adf43'
            '09e98e63eac1aa23585d05a7f0cdb8836126327c17272ad9246b82b41b95c47824c75553b71ee354b17c5c211e9ce47de4fe2d061c89573c67edc8983488a6bc'
            '3663f0d030d07d09a5dd397f2a26a50300c49411de87a8e32da1803e859c1db463ebefc9032bd4a9f04f3f0cc84ac912f9fbe053458ac8b613b0bbfac46d930c')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -Np1 -i "$srcdir"/27.patch
  patch -Np1 -i "$srcdir"/31.patch
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  qmake
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make INSTALL_ROOT="$pkgdir" install
}
