# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Contributor: Adrian Perez de Castro <aperez@igalia.com>

pkgdesc='Library to create Wayland desktop components using the Layer Shell protocol'
pkgname=gtk-layer-shell
pkgver=0.6.0
pkgrel=1
arch=(x86_64)
license=(LGPL3)
url="https://github.com/wmww/gtk-layer-shell"
depends=(
    "gtk3"
    "wayland"
)
makedepends=(
    "gtk-doc"
    "gobject-introspection"
    "meson"
    "ninja"
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/wmww/gtk-layer-shell/archive/v$pkgver.tar.gz")
sha512sums=('ca5367b5f1637a07c28c772e79e5ac84219ff069091077f83c5edbc88be084538a925b3c76e6cc9dcd8d2826ae340b79605875e87209ee4f4d5e27dc4e93a523')

build() {
    meson --prefix=/usr \
          --wrap-mode=nofallback \
          --buildtype=plain \
          -Dtests=true \
          -Ddocs=true \
          "$pkgname-$pkgver" \
          build
    ninja -C build
}

check() {
    ninja -C build test
}

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