# Maintainer: Jerome Leclanche <jerome@leclan.ch>
# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=qtermwidget
pkgver=0.14.1
pkgrel=1
pkgdesc="A terminal widget for Qt, used by QTerminal"
arch=("x86_64")
url="https://lxqt.org"
# Yep, it's messy when you're talking about licenses
license=("LGPL" "custom:BSD" "custom:Public Domain")
depends=("qt5-base")
makedepends=("lxqt-build-tools")
source=(
  "https://github.com/lxde/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
  "https://github.com/lxde/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz.asc"
)
sha256sums=('84739f91e6ac5900a39ed7cbb254397a9428b172ee3fe0d1b6c827b751dc3b6c'
            'SKIP')
validpgpkeys=(
  "169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
  "7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
)


build() {
  mkdir -p build
  cd build

  cmake "$srcdir/$pkgname-$pkgver" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir/$pkgname-$pkgver/README.md" -t "$pkgdir"/usr/share/licenses/$pkgname
}
