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

pkgname=passim
pkgver=0.1.11
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=('7492ee01d78566e2f3c5f856ea4261f3d1caeebf577ff456c801107f13c9856d948747dd54a69433dba4ef4623a5b36bb919d50f0be4f12cf936036a52a260be')
b2sums=('4eeaea6cd6d63fa8cb0a9149f016c46315baa18693659238d2ea4385c4d2ba6b9223edabf1537603be3bd459b6f45d412dd7d0beb1b6f870a6fde4eda769a55b')
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/*
}
