# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=evolution-ews
pkgver=3.54.2
pkgrel=0
pkgdesc="MS Exchange integration through Exchange Web Services"
url="https://wiki.gnome.org/Apps/Evolution/EWS"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	cmake
	evolution-data-server-dev
	evolution-dev
	gettext-dev
	glib-dev
	gtk-doc
	libmspack-dev
	libsoup3-dev
	samurai
	uhttpmock-dev
	"
options="!check" # fail in docker due to port restrictions
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/evolution-ews/${pkgver%.*}/evolution-ews-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DENABLE_TESTS=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sha512sums="
e63b10c17a36284224ec2bc5bf52c209c073c66c68917cc67f6202aa885e0b6a0095bb4865294084b4c8159881d14d78561766b74844bda803f28b4304fb5b02  evolution-ews-3.54.2.tar.xz
"
