From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 40EA313835B for ; Mon, 18 Jan 2021 08:55:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B195E087A; Mon, 18 Jan 2021 08:55:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 16A58E087A for ; Mon, 18 Jan 2021 08:55:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9ADE1340A5D for ; Mon, 18 Jan 2021 08:55:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F1AD592 for ; Mon, 18 Jan 2021 08:55:10 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1610960099.80e5d9524268b9897592f57de572545d16f25915.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/g810-led/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/g810-led/Manifest app-misc/g810-led/g810-led-0.4.2.ebuild X-VCS-Directories: app-misc/g810-led/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 80e5d9524268b9897592f57de572545d16f25915 X-VCS-Branch: master Date: Mon, 18 Jan 2021 08:55:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5e4af095-0ecd-4341-8c96-05f648e10698 X-Archives-Hash: 8325d00754f8218b5d86db5fc2dafbc1 commit: 80e5d9524268b9897592f57de572545d16f25915 Author: Peter Alfredsen icloud com> AuthorDate: Sat Dec 19 20:50:25 2020 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Mon Jan 18 08:54:59 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80e5d952 app-misc/g810-led: bump to 0.4.2 + various fixes 0.4.2 brings support for g815, builds with clang, and various minor fixes. Ebuild fixes: Create and populate /etc/g810-led/ as in upstream makefile so systemd .services work. Change udev rules to use uaccess instead of MODE="666". Set CXX to system compiler Build and use "bin-linked" g810-led. Same features, less space. Include headers in install Add pkg_postinst with hints about use Closes: https://bugs.gentoo.org/696468 Closes: https://bugs.gentoo.org/729288 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Peter Alfredsen icloud.com> Closes: https://github.com/gentoo/gentoo/pull/18730 Signed-off-by: Joonas Niilola gentoo.org> app-misc/g810-led/Manifest | 1 + app-misc/g810-led/g810-led-0.4.2.ebuild | 77 +++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/app-misc/g810-led/Manifest b/app-misc/g810-led/Manifest index 6feff0f1a83..68fa7a2e93b 100644 --- a/app-misc/g810-led/Manifest +++ b/app-misc/g810-led/Manifest @@ -1 +1,2 @@ DIST g810-led-0.3.6.tar.gz 34544 BLAKE2B 142fd54d7721a1deebfb019b644a4c8ab0fd5e1662391075cea67a4c7b7145034101f14c22975bdf079ee5b8e56c4a73e18fe31ce5d7fcf20ff4b9c64ee85502 SHA512 5a1877ee135a662bc5eb15c1afe5370cfe9243b4479823e3492f0da8f407b1438e3d7e35bd9992eea8dcbd4d548c9acdb7e74f4c99efbd4e9e8e6ddae33f8a5b +DIST g810-led-0.4.2.tar.gz 36669 BLAKE2B 738ca1849b05ddc35e42c258f67b2fedc2ab207594a32111aeca8cb1cffa99580e0f22e57ea92aff0e49f546e871b5af1c77cd5830349af98c9a977b27a0186b SHA512 03e62265964b6d47d474b57a92beb3a017e8479113750e7d52790d0779b8893eb7e3761f236db94ff1e1ddb0424c711fd1a35c869d0f93ad68104b1ddd2bf1e8 diff --git a/app-misc/g810-led/g810-led-0.4.2.ebuild b/app-misc/g810-led/g810-led-0.4.2.ebuild new file mode 100644 index 00000000000..5e5b098aef0 --- /dev/null +++ b/app-misc/g810-led/g810-led-0.4.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 2018-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils systemd toolchain-funcs udev + +DESCRIPTION="Led controller for Logitech G- Keyboards" +HOMEPAGE="https://github.com/MatMoul/g810-led" +SRC_URI="https://github.com/MatMoul/g810-led/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+hidapi" + +RDEPEND=" + hidapi? ( dev-libs/hidapi:= ) + !hidapi? ( virtual/libusb:= ) + " +DEPEND="${RDEPEND}" + +DOCS=("README.md" "sample_profiles" "sample_effects") + +src_prepare() { + default + # See + # https://github.com/systemd/systemd/issues/4288 + # https://sourceforge.net/p/sigrok/mailman/sigrok-devel/thread/12691365.gQiffmFRoU%40pebbles.site/ + # We remove the MODE-bit since it's already set to 660+GROUP="input" by default udev rules + sed -i \ + -e 's|MODE="666"|TAG+="uaccess",|' \ + udev/g810-led.rules || die +} + +src_compile() { + emake LIB="$(usex hidapi hidapi libusb)" CXX="$(tc-getCXX)" bin-linked +} + +src_install() { + dolib.so "lib/libg810-led.so.${PV}" + dosym "libg810-led.so.${PV}" "/usr/$(get_libdir)/libg810-led.so" + + insinto /etc/g810-led/ + newins sample_profiles/group_keys profile + newins sample_profiles/all_off reboot + + dobin bin/g810-led + local boards=(213 410 413 512 513 610 815 910 pro) + local x + for x in "${boards[@]}"; do + dosym g810-led "/usr/bin/g${x}-led" + done + + insinto /usr/include/g810-led + doins src/classes/*.h + + systemd_dounit systemd/g810-led.service + systemd_dounit systemd/g810-led-reboot.service + + udev_newrules udev/g810-led.rules 60-g810-led.rules + + einstalldocs +} + +pkg_postinst() { + elog "The file /etc/g810-led/profile is run on boot and device insertion." + elog "The default file can be replaced by other examples:" + elog "/usr/share/doc/${PF}/sample_profiles" + elog "Read the documentation in:" + elog "/usr/share/doc/${PF}/" + elog "to make your own." + if systemd_is_booted; then + elog "To turn off the LEDs on shutdown and save power, do:" + elog "systemctl enable g810-led-reboot.service" + fi +}