6.3.1.arch2-1
[arch-packages.git] / qt6-doc / repos / extra-any / PKGBUILD
blobf2dd3e224c2cd31775fa29eda4335f648995a844
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.5.0
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=('dba376e110e53895c7c827eea389dc12aa9c45862cd197d2f0d37ee472baf0b0')
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     -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
34   cmake --build build --target docs
37 package_qt6-doc() {
38   pkgdesc='A cross-platform application and UI framework (Documentation)'
39   DESTDIR="$pkgdir" cmake --build build --target install_docs
41   install -Dm644 $_pkgfn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgbase
44 package_qt6-examples() {
45   pkgdesc='Examples and demos from qt6 documentation'
46   depends=('qt6-doc')
48   _base="$pkgdir"/usr/share/doc/qt6/examples
50   # The various example dirs have conflicting .pro files, but
51   # QtCreator requires them to be in the same top-level directory.
52   # Matching the Qt5 installer, only the qtbase project is kept.
53   mkdir -p $_base
54   cp ${_pkgfn}/qtbase/examples/examples.pro $_base
56   _fdirs=$(find "${_pkgfn}" -maxdepth 2 -type d -name examples)
57   for _dir in $_fdirs; do
58       _mod=$(basename ${_dir%/examples})
59       if [ -e "$_dir/README" ]; then
60         cp $_dir/README $_dir/README.$_mod
61       fi
62       mkdir $_base/$_mod
63       cp -rn $_dir/* $_base/$_mod
64   done