# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=qcoro
pkgver=0.11.0
pkgrel=1
pkgdesc='C++ Coroutines for Qt'
arch=(x86_64)
url='https://github.com/danvratil/qcoro'
license=(MIT)
depends=(gcc-libs
         glibc
         qt6-base
         qt6-declarative
         qt6-websockets)
makedepends=(cmake
             git)
conflicts=(qcoro-qt6)
provides=(qcoro-qt6)
replaces=(qcoro-qt6)
source=(git+https://github.com/danvratil/qcoro#tag=v$pkgver)
sha256sums=('c6af0228ce31478135feda901ef6d0a3b4dc157ebc2cd803608d22cf6cc00bfc')

build() {
  cmake -B build -S $pkgname \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgbase/LICENSES/MIT.txt -t "$pkgdir"/usr/share/licenses/$pkgname
}
