# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=showmethekey
pkgver=1.18.1
pkgrel=0
pkgdesc="Show keys you typed on screen"
url="https://github.com/AlynxZhou/showmethekey"
arch="all !s390x" # blocked by gtk4.0
license="Apache-2.0"
makedepends="
	eudev-dev
	gtk4.0-dev
	json-glib-dev
	libadwaita-dev
	libevdev-dev
	libinput-dev
	meson
	"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/AlynxZhou/showmethekey/archive/v$pkgver/showmethekey-$pkgver.tar.gz
	cli-exec-wrapper.patch
	showmethekey-cli-exec
	"
options="!check"  # no tests provided

build() {
	abuild-meson \
		--bindir /usr/libexec \
		. output
	meson compile -C output
}

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

	install -m755 "$srcdir"/showmethekey-cli-exec "$pkgdir"/usr/libexec/
}

sha512sums="
48def70a21de5e0e19995184fb46ed630968c03b259936ee75cb655b6b0607474333d20b26395a64523328db33dbe55b167fa1da9f07b507727f8a513693385c  showmethekey-1.18.1.tar.gz
c2fd9138bf3f6cd8c1907065e686a12bf9e6e46a36cba312d4884d32a3590c159a7ba5090e8378365313374b4e87685b9d85ec46b638ab5552604b83f87ffd0a  cli-exec-wrapper.patch
32cef0b0e175fb29c36284cb9c8a2952e2088688ebce34128e3760d6f9216346ccef73b3216fa982748038e31c25c6a59625966fa924557bbda7e3f66f09b23d  showmethekey-cli-exec
"
