# Maintainer: Frederik Schwan <freswa at archlinux dot org>

pkgname=passim
pkgver=0.1.10
pkgrel=1
pkgdesc="A local caching server"
arch=(x86_64 aarch64)
url="https://github.com/hughsie/passim"
license=(LGPL-2.1-or-later)
depends=(
  avahi
  glib2 libgio-2.0.so
  gnutls
  hicolor-icon-theme
  libsoup3 libsoup-3.0.so
)
makedepends=(
  cmake
  git
  gobject-introspection
  meson
  systemd
)
provides=(libpassim.so)
backup=(
  etc/passim.conf
)
source=("git+https://github.com/hughsie/passim.git#tag=${pkgver}?signed")
sha512sums=('800590e98f46ca817b6e7b6385eeb3c4789afe363553e5084ac6f82f6253bfac0f001208101684bc463849d1e37210a6e3f6e45ae82ffd84a0928b23a8f2c08e')
b2sums=('eaa66a128d1a3a5502c3e9aed8e5d32f32a04d5521361769ec6a6ec7cd8619d7b019d7706e42bd01e33f627a8a7ef630d964d8ee81ae2ed42b230b4b2e125b75')
validpgpkeys=(163EB50119225DB3DF8F49EA17ACBA8DFA970E17) # Richard Hughes <richard@hughsie.com>

build() {
  arch-meson ${pkgname} build
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  rm "${pkgdir}"/var/lib/passim/data/*
}
