# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnotify
pkgver=0.8.6
pkgrel=0
pkgdesc="Desktop notification library"
url="https://gitlab.gnome.org/GNOME/libnotify"
arch="all"
options="!check" # No tests defined when building with meson.
license="LGPL-2.1-or-later"
makedepends="
	dbus-dev
	docbook-xsl
	gdk-pixbuf-dev
	gobject-introspection-dev
	gtk+3.0-dev
	meson
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/libnotify/${pkgver%.*}/libnotify-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dtests="$(want_check && echo true || echo false)"\
		-Dintrospection=enabled \
		-Dgtk_doc=false \
		-Dman=true \
		output
	meson compile -C output
}

check() {
	meson test --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
6e566f5907cfd7d623d58f5aa22d547271feb7e52bf28e463ecb98a763d6f7ad38cacc473d65e6f4a7e44c0514ab008078042e56a8b61edb719b9a1d192c2e34  libnotify-0.8.6.tar.xz
"
