# Template file for 'libinput-debug-gui'
# keep in sync with libinput
# split to avoid cycle: gst-plugins-bad1 -> zbar -> qt5 -> libinput -> gtk4 -> gst-plugins-bad1
pkgname=libinput-debug-gui
version=1.21.0
revision=1
build_style=meson
configure_args="-Db_ndebug=false -Dtests=false -Ddebug-gui=true"
hostmakedepends="pkg-config wayland-devel"
makedepends="libevdev-devel libwacom-devel mtdev-devel eudev-libudev-devel
 gtk4-devel"
short_desc="Provides handling input devices in Wayland compositors and X"
maintainer="Michal Vasilek <michal@vasilek.cz>"
license="MIT"
homepage="https://www.freedesktop.org/wiki/Software/libinput"
distfiles="https://gitlab.freedesktop.org/libinput/libinput/-/archive/${version}/libinput-${version}.tar.gz"
checksum=1b23c180f5b297303ed36f5a549910f5d320b0eb21052eac67a966d4eaa4e01d

post_install() {
	mv ${DESTDIR}/usr/libexec/libinput/libinput-debug-gui ${DESTDIR}/libinput-debug-gui
	mv ${DESTDIR}/usr/share/man/man1/libinput-debug-gui.1 ${DESTDIR}/libinput-debug-gui.1
	rm -r ${DESTDIR}/usr
	vmkdir usr/libexec/libinput
	mv ${DESTDIR}/libinput-debug-gui ${DESTDIR}/usr/libexec/libinput/libinput-debug-gui
	vmkdir usr/share/man/man1
	mv ${DESTDIR}/libinput-debug-gui.1 ${DESTDIR}/usr/share/man/man1/libinput-debug-gui.1
	vlicense COPYING
}
