# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=qt6-wayland
pkgver=6.7.2
pkgrel=1
arch=(x86_64)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
pkgdesc='Provides APIs for Wayland'
depends=(gcc-libs
         glibc
         libglvnd
         libxkbcommon
         qt6-base
         qt6-declarative
         wayland)
makedepends=(cmake
             git
             ninja)
groups=(qt6)
_pkgfn=${pkgname/6-/}
source=(git+https://code.qt.io/qt/$_pkgfn#tag=v$pkgver)
sha256sums=('b6153c2d65c3be61905802f3598ec96bad012799737681c5cc5f83c907612435')

build() {
  cmake -B build -S $_pkgfn -G Ninja \
    -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -d "$pkgdir"/usr/share/licenses
  ln -s /usr/share/licenses/qt6-base "$pkgdir"/usr/share/licenses/$pkgname
}
