# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=libcmatrix
pkgver=0.0.2
pkgrel=0
pkgdesc="Matrix protocol library written in C using GObject"
url="https://source.puri.sm/Librem5/libcmatrix"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	glib-dev
	json-glib-dev
	libgcrypt-dev
	libsecret-dev
	libsoup3-dev
	meson
	olm-dev
	sqlite-dev
	"
subpackages="$pkgname-dev"
source="https://source.puri.sm/Librem5/libcmatrix/-/archive/v$pkgver/libcmatrix-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
9d0165cd4c429458a2b88faffa37fa08b6e1ad3c8f26e2c93b3211921cd25ae03cbf2b9ecd1fe4e7f73b333976e11903cf47c0b39b35d9c8e79cac157b8f2dee  libcmatrix-v0.0.2.tar.gz
"
