# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=evolution-data-server
pkgver=3.26.0
pkgrel=1
pkgdesc="data server for evolution"
url="http://projects.gnome.org/evolution"
arch="x86_64 x86 ppc64le aarch64 armhf"
license="GPL"
options="suid !check"
depends_dev="libgdata-dev db-dev gcr-dev icu-dev"
makedepends="$depends_dev gperf flex bison glib-dev gtk+3.0-dev libsecret-dev
	libsoup-dev libxml2-dev nss-dev sqlite-dev krb5-dev gnu-libiconv-dev
	openldap-dev libgdata-dev json-glib-dev webkit2gtk-dev libgweather-dev
	cmake libical-dev"
subpackages="$pkgname-dev $pkgname-lang"
source="http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-${pkgver}.tar.xz"
builddir="${srcdir}/${pkgname}-${pkgver}"

prepare() {
	default_prepare
	mkdir -p "$builddir"/build
}

build() {
	cd "$builddir"/build
	CFLAGS="$CFLAGS -I/usr/include/gnu-libiconv" \
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DCMAKE_BUILD_TYPE=Release \
		-DENABLE_GOA=OFF \
		-DENABLE_UOA=OFF \
		..
	make
}

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

sha512sums="9cebde70e41d770c2641f78c49e8ebe6a00225ac3c298949f9e025979d4254f5fd45fffbd3cdc86a281756eeb090ba433e7f758813b8799ee1f5e118cec3bd17  evolution-data-server-3.26.0.tar.xz"
