# Contributor: Sodface <sod@sodface.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=touchegg
pkgver=2.0.18
pkgrel=0
pkgdesc="Multitouch gesture recognizer"
url="https://github.com/JoseExposito/touchegg"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cairo-dev
	cmake
	eudev-dev
	glib-dev
	gtk+3.0-dev
	libinput-dev
	libx11-dev
	libxi-dev
	libxrandr-dev
	libxtst-dev
	pugixml-dev
	samurai
	"
options="!check" # No test suite
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/JoseExposito/touchegg/archive/$pkgver.tar.gz
	$pkgname.initd"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DUSE_SYSTEMD=off
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm755 "$srcdir"/touchegg.initd \
		"$pkgdir"/etc/init.d/touchegg
}

sha512sums="
79c806dc21305a6a1ebe5ad8db3c7b632876ca24627cef02e7cd89b0ea4ab34ddd9ccc9f631bba34f19fa25508b1193307f2a79fbc875e52f29be2356c84e4ec  touchegg-2.0.18.tar.gz
4c334bfd81f372e700f57670c17b9bf52b37adc37a62ae466d47e6ae67e14df5dffff5b80b4c031f2dc46b00077d8be8fc18e87214c682fb4130d87e599fd597  touchegg.initd
"
