# Template file for 'evemu'
pkgname=evemu
version=2.7.0
revision=5
build_style=gnu-configure
hostmakedepends="pkg-config python3 asciidoc xmlto"
makedepends="libevdev-devel"
short_desc="Kernel device emulation"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-3.0-only, MIT"
homepage="https://freedesktop.org/wiki/Evemu/"
distfiles=${FREEDESKTOP_SITE}/evemu/evemu-$version.tar.xz
checksum=78c9400d55eeeb5ab75161360543f9376438c4da4934cb34cdda5b46021ae379

post_extract() {
	# The py-compile helper uses the imp module, removed in Python 3.12;
	# besides, we don't want the module pre-compiled anyway, so just drop it
	: > config-aux/py-compile
	cat > config-aux/py-compile <<-'EOF'
		#!/bin/sh
		: "$@"
		EOF
}

post_install() {
	sed -n '/Copyright/,/IN THE SOFTWARE/p' src/evemu.c >LICENSE
	vlicense LICENSE
}

evemu-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
	}
}
