archrelease: copy trunk to extra-x86_64
[arch-packages.git] / qt6-doc / repos / extra-any / PKGBUILD
blob034adc61867c59a3bba159be1f81808f354e776b
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
5 pkgbase=qt6-doc
6 pkgname=(qt6-doc qt6-examples)
7 _qtver=6.3.1
8 pkgver=${_qtver/-/}
9 pkgrel=1
10 arch=('any')
11 url='https://www.qt.io'
12 license=(GPL3 LGPL3 FDL custom)
13 makedepends=(cmake ninja mariadb-libs unixodbc postgresql alsa-lib gst-plugins-base-libs
14              gtk3 libpulse cups freetds vulkan-headers clang python llvm qt6-tools qt6-declarative)
15 groups=(qt6)
16 _pkgfn=qt-everywhere-src-$_qtver
17 source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/single/$_pkgfn.tar.xz)
18 sha256sums=('51114e789485fdb6b35d112dfd7c7abb38326325ac51221b6341564a1c3cc726')
20 build() {
21   cmake -B build -S $_pkgfn -G Ninja \
22     -DCMAKE_INSTALL_PREFIX=/usr \
23     -DQT_HOST_PATH=/usr \
24     -DINSTALL_BINDIR=lib/qt6/bin \
25     -DINSTALL_DOCDIR=share/doc/qt6 \
26     -DINSTALL_ARCHDATADIR=lib/qt6 \
27     -DINSTALL_DATADIR=share/qt6 \
28     -DINSTALL_INCLUDEDIR=include/qt6 \
29     -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
30     -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
31     -DQT_FEATURE_journald=ON \
32     -DQT_FEATURE_openssl_linked=ON
33   cmake --build build --target docs
36 package_qt6-doc() {
37   pkgdesc='A cross-platform application and UI framework (Documentation)'
38   DESTDIR="$pkgdir" cmake --build build --target install_docs
40   install -Dm644 $_pkgfn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgbase
43 package_qt6-examples() {
44   pkgdesc='Examples and demos from qt6 documentation'
45   depends=('qt6-doc')
47   _base="$pkgdir"/usr/share/doc/qt6/examples
49   # The various example dirs have conflicting .pro files, but
50   # QtCreator requires them to be in the same top-level directory.
51   # Matching the Qt5 installer, only the qtbase project is kept.
52   mkdir -p $_base
53   cp ${_pkgfn}/qtbase/examples/examples.pro $_base
55   _fdirs=$(find "${_pkgfn}" -maxdepth 2 -type d -name examples)
56   for _dir in $_fdirs; do
57       _mod=$(basename ${_dir%/examples})
59       if [ -e "$_dir/README" ]; then
60         cp $_dir/README $_dir/README.$_mod
61       fi
63 #     mkdir $_base/$_mod
64       cp -rn $_dir/* $_base
65   done