text: # Contributor: Bart Ribbers <bribbers@disroot.org>
  # Maintainer: Bart Ribbers <bribbers@disroot.org>
  pkgname=calendarsupport
  pkgver=20.08.1
  pkgrel=0
  pkgdesc="Library providing calendar support"
  arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by akonadi-calendar-dev -> kmailtransport -> libkgapi -> qt5-qtwebengine
  url="https://kontact.kde.org"
  license="GPL-2.0-or-later AND Qt-GPL-exception-1.0 AND LGPL-2.0-or-later"
  depends_dev="
  	akonadi-calendar-dev
  	akonadi-dev
  	akonadi-mime-dev
  	akonadi-notes-dev
  	kcalendarcore-dev
  	kcalutils-dev
  	kcodecs-dev
  	kguiaddons-dev
  	kholidays-dev
  	ki18n-dev
  	kidentitymanagement-dev
  	kio-dev
  	kmime-dev
  	pimcommon-dev
  	qt5-qtbase-dev
  	"
  makedepends="$depends_dev
  	extra-cmake-modules
  	qt5-qttools-dev
  	qt5-qttools-static
  	"
  checkdepends="xvfb-run"
  source="https://download.kde.org/stable/release-service/$pkgver/src/calendarsupport-$pkgver.tar.xz"
  subpackages="$pkgname-dev $pkgname-lang"
  
  build() {
  	cmake -B build \
  		-DCMAKE_BUILD_TYPE=None \
  		-DCMAKE_INSTALL_PREFIX=/usr \
  		-DCMAKE_INSTALL_LIBDIR=lib
  	cmake --build build
  }
  
  check() {
  	cd build
  	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
  }
  
  package() {
  	DESTDIR="$pkgdir" cmake --build build --target install
  }
  sha512sums="65849b524534b154ad45413ee35f6da2e9ce5edc4c3dc516f868adf70098793c609b726c4b484d9106c6b31fca830fd575b9671abb006173a00f2ccadc44551e  calendarsupport-20.08.1.tar.xz"
  