1 # Copyright 2018-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit systemd udev eutils
8 DESCRIPTION="Led controller for Logitech G- Keyboards"
9 HOMEPAGE="https://github.com/MatMoul/g810-led"
10 SRC_URI="https://github.com/MatMoul/g810-led/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18 hidapi? ( dev-libs/hidapi:= )
19 !hidapi? ( virtual/libusb:= )
24 DOCS=("README.md" "sample_profiles" "sample_effects")
27 emake LIB="$(usex hidapi hidapi libusb)"
31 dolib.so "lib/libg810-led.so.${PV}"
32 dosym "libg810-led.so.${PV}" "/usr/$(get_libdir)/libg810-led.so"
35 local boards=(213 410 413 512 513 610 910 pro)
37 for x in "${boards[@]}"; do
38 dosym g810-led "/usr/bin/g${x}-led"
41 systemd_dounit systemd/g810-led.service
42 systemd_dounit systemd/g810-led-reboot.service
44 udev_newrules udev/g810-led.rules 60-g810-led.rules