# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>

pkgname=parley
pkgver=19.12.3
pkgrel=1
pkgrel+=.parabola1
pkgdesc="Vocabulary Trainer"
pkgdesc+=", without qt5-webengine"
url="https://kde.org/applications/education/parley/"
arch=(x86_64)
arch+=(i686 armv7h)
license=(GPL LGPL FDL)
groups=(kde-applications kdeedu)
depends=(kross knewstuff libkeduvocdocument qt5-webkit kcmutils)
makedepends=(extra-cmake-modules kdoctools)
source=("https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
        "libre.patch")
sha256sums=('ebf9fdec981abca988d83d8a77e921e7ce871eb010b6cf4ea9065ee6d45f5089'
            'SKIP'
            '5028f4e5183676f377274fd5b895721125e377165441a6ec48a9bf330765309b')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build

  # remove qt5-webengine references
  cd $pkgname-$pkgver
  patch -Np1 -i "$srcdir"/libre.patch
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  make
}

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