logo

overlay

My (experimental) gentoo overlay

g810-led-0.3.1.ebuild (1030B)


      1 # Copyright 2018-2019 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=7
      5 
      6 inherit systemd udev eutils
      7 
      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"
     11 
     12 LICENSE="GPL-3"
     13 SLOT="0"
     14 KEYWORDS="~amd64"
     15 IUSE="+hidapi"
     16 
     17 RDEPEND="
     18 	hidapi? ( dev-libs/hidapi:= )
     19 	!hidapi? ( virtual/libusb:= )
     20 "
     21 
     22 DEPEND="${RDEPEND}"
     23 
     24 DOCS=("README.md" "sample_profiles" "sample_effects")
     25 
     26 src_compile() {
     27 	emake LIB="$(usex hidapi hidapi libusb)"
     28 }
     29 
     30 src_install() {
     31 	dolib.so "lib/libg810-led.so.${PV}"
     32 	dosym "libg810-led.so.${PV}" "/usr/$(get_libdir)/libg810-led.so"
     33 
     34 	dobin bin/g810-led
     35 	local boards=(213 410 413 512 513 610 910 pro)
     36 	local x
     37 	for x in "${boards[@]}"; do
     38 		dosym g810-led "/usr/bin/g${x}-led"
     39 	done
     40 
     41 	systemd_dounit systemd/g810-led.service
     42 	systemd_dounit systemd/g810-led-reboot.service
     43 
     44 	udev_newrules udev/g810-led.rules 60-g810-led.rules
     45 
     46 	einstalldocs
     47 }