# Template file for 'g810-led'
pkgname=g810-led
version=0.4.3
revision=1
build_style=gnu-makefile
makedepends="hidapi-devel"
short_desc="LED controller for Logitech G213,410,512,610,810,910,PRO keyboards"
maintainer="Alex Childs <misuchiru03+void@gmail.com>"
license="GPL-3.0-only"
homepage="https://github.com/MatMoul/g810-led/"
distfiles="https://github.com/MatMoul/g810-led/archive/v${version}.tar.gz"
checksum=8af6275aa190fd17fdef36079d51361874c88e2df0b23a76e7651d4f7c7c99fc

do_install() {
	vbin bin/g810-led
	for i in 210 410 413 512 513 610 910 pro; do
		ln -s /usr/bin/g810-led $DESTDIR/usr/bin/g$i-led
	done
	vmkdir usr/lib
	vcopy "lib/*.so.*" usr/lib
	vmkdir usr/lib/udev/rules.d/
	vinstall udev/g810-led.rules 0644 usr/lib/udev/rules.d 70-g810-led.rules
	vdoc README.md
	vdoc INSTALL.md
	for i in sample_profiles/*; do
		vsconf $i
	done
}
