# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=dino
pkgver=0.5.0
pkgrel=1
pkgdesc="Modern Jabber/XMPP client"
url="https://dino.im"
arch="all !s390x !ppc64le"
license="GPL-3.0-only"
depends="gst-plugins-good gst-plugins-good-gtk icu-data-full"
makedepends="
	meson
	glib-dev
	glib-networking
	gpgme-dev
	gspell-dev
	gst-libav
	gst-plugins-base-dev
	gtk4.0-dev
	libadwaita-dev
	libcanberra-dev
	libgcrypt-dev
	libgee-dev
	libnice-dev
	libomemo-c-dev
	libqrencode-dev
	libsoup3-dev
	libsrtp-dev
	ninja
	sqlite-dev
	vala
	webrtc-audio-processing-2-dev
	"
subpackages="$pkgname-lang $pkgname-notificationsound"
source="https://github.com/dino/dino/releases/download/v$pkgver/dino-$pkgver.tar.gz"

# secfixes:
#   0.4.2-r0:
#     - CVE-2023-28686
#   0.2.1-r0:
#     - CVE-2021-33896

build() {
	abuild-meson \
		-Dplugin-notification-sound=enabled \
		. output
	meson compile -C output
}

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

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

notificationsound() {
	amove usr/lib/dino/plugins/notification-sound.so
}

sha512sums="
9cb6db27e6afd42204990c836019bc84a2a61af839d59cf8378520308d3016e6ac674ea4abd3044dfdf18e21e8431ef3cc85ad70d02c89d95c4dc702b32e05d2  dino-0.5.0.tar.gz
"
