pkgname=granite
pkgver=7.6.0
pkgdesc='Library that extends Gtk+'
arch=(x86_64)
homepage=https://github.com/elementary/granite
license=(LGPL3)
depends=(
  cairo
  glib:2
  gtk:4
  libgee:0.8
)
makedepends=(
  cmake
  meson
  sassc
  vala
)
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/elementary/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=("0a3ab1aa9d648578d80877beaab52eebd1b77981f54f9ca0b9c88e44c9a832738e4bd52357e6537b783d64ac6a7812c8a73331dfe759d12e1f3ea212ba111f5f")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D python.bytecompile=1
    -D documentation=false
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

src_check() {
  meson test -C build
}

src_install() {
  meson install -C build --destdir "$pkgdir"
}

# vim:ft=sh syn=sh et sw=2:
