pkgname=gtk-update-icon-cache
pkgver=3.24.42
pkgdesc="GTK update icon cache"
homepage="https://www.gtk.org/ https://gitlab.gnome.org/Community/gentoo/gtk-update-icon-cache"
depends=(
  ">=dev-libs/glib-2.53.4:2"
  ">=x11-libs/gdk-pixbuf-2.30:2"
  "app-text/docbook-xml-dtd"
  "app-text/docbook-xsl-stylesheets"
)
_hook="gtk-update-icon-cache.HOOK"
_hook_sum="4748f33e21d09a2617f2751c754f2674a18969156feb09bf8f23b7765f980855caccde4ea29459acfc05d93bba30a7c40375ceb38519a75f48337095ab76a226"
sources=("${pkgname}-${pkgver}.tar.bz2"
  "${_hook}"
)
urls=("https://gitlab.gnome.org/Community/gentoo/${pkgname}/-/archive/${pkgver}/${sources[0]}"
  "${_hook}"
)
sha512sums=("2eb78c3db7ad95df0ae422686cb0e4d857a78ea6ac94afdaf6563a8a366f8dbf93bf2e7db0e26a723107f668abdecc47a7aa720753f79bdfc82dc19450bc8883"
  "${_hook_sum}"
)

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
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

src_install() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
  leaf_install_hook "${filedir}/${_hook}"
}

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