# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=qt6-translations
_pkgver=6.8.1
pkgver=6.8.1
pkgrel=1
arch=(any)
url='https://www.qt.io'
license=(GPL-3.0-only
         LGPL-3.0-only
         LicenseRef-Qt-Commercial
         Qt-GPL-exception-1.0)
pkgdesc='A cross-platform application and UI framework (Translations)'
depends=()
makedepends=(cmake
             git
             ninja
             qt6-tools)
groups=(qt6)
_pkgfn=${pkgname/6-/}
source=(git+https://code.qt.io/qt/$_pkgfn#tag=v$_pkgver)
sha256sums=('4c256b83d77e534ff7a7845710ea913405f08d640b4c1d9f0b327a6cb5e6d93b')

build() {
  export PATH="/usr/lib/qt6/bin:$PATH"
  cmake -B build -S $_pkgfn -G Ninja \
    -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
  cmake --build build -j1
}

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

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