# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'evolution'
setvar pkgver = '3.26.0'
setvar pkgrel = '0'
setvar pkgdesc = ""evolution mail client""
setvar url = ""http://projects.gnome.org/evolution""
# limited by webkit2gtk
setvar arch = ""x86 x86_64 ppc64le aarch64 armhf""
setvar license = ""GPL""
setvar depends = ""highlight gsettings-desktop-schemas""
setvar depends_dev = ""itstool libxml2-dev gcr-dev enchant-dev libcanberra-dev
	libgweather-dev openldap-dev libnotify-dev""
setvar makedepends = ""$depends_dev gperf flex bison libxml2-utils glib-dev
	webkit2gtk-dev gtkspell3-dev evolution-data-server-dev glib-dev
	gtk+3.0-dev nss-dev cmake gnu-libiconv-dev gsettings-desktop-schemas-dev""
setvar subpackages = ""$pkgname-dev $pkgname-doc $pkgname-lang""
setvar source = ""http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz""
setvar builddir = ""${srcdir}/${pkgname}-${pkgver}""

proc build {
	mkdir -p "$builddir"/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_GNOME_DESKTOP=OFF \
		-DENABLE_AUTOAR=OFF \
		-DENABLE_LIBCRYPTUI=OFF \
		-DENABLE_YTNEF=OFF \
		-DENABLE_PST_IMPORT=OFF \
		-DENABLE_NSS=ON \
		-DENABLE_SMIME=ON \
		..
	make
}

proc check {
	cd "$builddir"/build
	make check
}

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

setvar sha512sums = ""297554495afcbfa681bf3108ec0f3c208c68d1fab181d283e9131ca0a3ed8301f631e69f1bcec0592296a023dadec991babf7b0194f6e47a9455a1e1642a5740  evolution-3.26.0.tar.xz""