# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=evolution-ews
_pkgname="EVOLUTION_EWS"
pkgver=3.26.0
pkgrel=0
pkgdesc="MS Exchange integration through Exchange Web Services"
url="https://wiki.gnome.org/Apps/Evolution/EWS"
arch="x86 x86_64 ppc64le"
license="LGPL-2.1"
depends="evolution"
makedepends="cmake
	gtk-doc intltool glib-dev gettext-dev gnome-common
	evolution-data-server-dev evolution-dev libmspack-dev"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNOME/$pkgname/archive/${_pkgname}_${pkgver//./_}.tar.gz"
builddir="$srcdir/$pkgname-${_pkgname}_${pkgver//./_}"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
	CFLAGS="$CFLAGS -I/usr/include/gnu-libiconv" \
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		.. \
                || return 1
	make || return 1
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="cdfe368a02985cfb6b86b1f282cc09ec4ed6652d9535c38926284fd2310099f36f9add01894a1d411651d0a62c3ecfc5862a794a4cc9736261694486614e872b  evolution-ews-3.26.0.tar.gz"
