# Maintainer: Kimiblock Moe

pkgname=element-call-git
pkgdesc="Group calls powered by Matrix"
url="https://github.com/element-hq/element-call"
license=("Apache-2.0")
arch=("any")
pkgver=20260612.080550
pkgrel=2
makedepends=("git" "pnpm" "nodejs-vite")
depends=()
source=("git+${url}")
md5sums=('SKIP')
provides=("element-call")
options=()
backup=()

function prepare() {
	cd element-call
	pnpm i --pm-on-fail=warn
}

function build() {
	cd element-call
	pnpm build --pm-on-fail=warn
}

function package() {
	cd element-call
	install -d "${pkgdir}/usr/share/element-call"
	cp -r dist/* "${pkgdir}/usr/share/element-call"
	ln -srf \
		"${pkgdir}/usr/share/webapps/element-call" \
		"${pkgdir}/usr/share/element-call"
}
