# Maintainer: Martchus <martchus@gmx.net>

# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.

_name=qtutilities
_reponame=$_name
pkgname=$_name-doc
pkgver=6.6.2
pkgrel=2
arch=('any')
pkgdesc='Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models (API documentation)'
license=('GPL')
makedepends=('cmake' 'ninja' 'doxygen' 'dia' 'graphviz' 'c++utilities' 'qt5-tools' 'mesa')
url="https://github.com/Martchus/${_reponame}"
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('6be07b06d7319b907bbd6b88b55b5367ce935443a92c1953116f9dbad8363000')

build() {
  cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
  cmake \
    -G Ninja \
    -DCMAKE_BUILD_TYPE:STRING='Release' \
    -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
    -DBUILD_SHARED_LIBS:BOOL=ON \
    .
  ninja ${_name}_apidoc
}

package() {
  cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
  DESTDIR="${pkgdir}" ninja install-api-doc
}
