# Maintainer: Felitendo
# This PKGBUILD is updated automatically:
# https://github.com/Felitendo/PKGBUILDS

pkgname=bazaar
pkgver=0.9.1
pkgrel=1
pkgdesc="App store for GNOME with a focus on flatpaks and Flathub"
arch=('x86_64')
url="https://github.com/bazaar-org/bazaar"
license=('GPL-3.0-only')
depends=('appstream' 'cairo' 'dconf' 'flatpak' 'glib2' 'glycin' 'glycin-gtk4'
         'graphene' 'gtk4' 'gtksourceview5' 'json-glib' 'libadwaita' 'libdex'
         'libheif' 'libmalcontent' 'libproxy' 'libsecret' 'libsoup3' 'libxmlb'
         'libyaml' 'md4c' 'pango' 'webkitgtk-6.0' 'hicolor-icon-theme')
makedepends=('meson' 'ninja' 'blueprint-compiler' 'glib2-devel' 'gettext'
             'gobject-introspection' 'python-babel')
optdepends=('krunner-bazaar: krunner integration'
            'malcontent: parental controls')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('1b2783845b183a9cea87048e582dcbdd71d7771a7f65f89d7ec8a563af2d550f')

build() {
  meson setup build "${pkgname}-${pkgver}" \
    --prefix=/usr \
    --buildtype=release \
    --wrap-mode=nodownload
  meson compile -C build
}

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

  # generated by pacman hooks; shipping them would cause file conflicts
  rm -f "$pkgdir/usr/share/glib-2.0/schemas/gschemas.compiled" \
        "$pkgdir/usr/share/applications/mimeinfo.cache" \
        "$pkgdir/usr/share/icons/hicolor/icon-theme.cache"
}
