commit: c39ad955aeb18ddb2930f2335ffcaa9b97ea33e9 Author: Matthew Smith <matthew <AT> gentoo <DOT> org> AuthorDate: Sat Dec 9 21:13:37 2023 +0000 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> CommitDate: Sat Dec 9 21:15:23 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c39ad955
app-misc/wally-cli: install udev rules Install udev rules from the wally-cli wiki, add acct-group/plugdev to RDEPEND, add a postinst message, and use 'ego build'. Closes: https://bugs.gentoo.org/893944 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> app-misc/wally-cli/files/50-zsa.rules | 26 ++++++++++++++++++++++ ...-cli-2.0.1.ebuild => wally-cli-2.0.1-r1.ebuild} | 22 ++++++++++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/app-misc/wally-cli/files/50-zsa.rules b/app-misc/wally-cli/files/50-zsa.rules new file mode 100644 index 000000000000..0dbb2e2be4dd --- /dev/null +++ b/app-misc/wally-cli/files/50-zsa.rules @@ -0,0 +1,26 @@ +# https://github.com/zsa/wally/wiki/Linux-install + +# Rules for Oryx web flashing and live training +KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" +KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" + +# Legacy rules for live training over webusb (Not needed for firmware v21+) + # Rule for all ZSA keyboards + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" + # Rule for the Moonlander + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" + # Rule for the Ergodox EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" + # Rule for the Planck EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" + +# Wally Flashing rules for the Ergodox EZ +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" + +# Keymapp / Wally Flashing rules for the Moonlander and Planck EZ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" +# Keymapp Flashing rules for the Voyager +SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" diff --git a/app-misc/wally-cli/wally-cli-2.0.1.ebuild b/app-misc/wally-cli/wally-cli-2.0.1-r1.ebuild similarity index 66% rename from app-misc/wally-cli/wally-cli-2.0.1.ebuild rename to app-misc/wally-cli/wally-cli-2.0.1-r1.ebuild index 7f2b088452d9..0f1aa93539c9 100644 --- a/app-misc/wally-cli/wally-cli-2.0.1.ebuild +++ b/app-misc/wally-cli/wally-cli-2.0.1-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit go-module +inherit go-module udev DESCRIPTION="Flash your ZSA Keyboard the EZ way" HOMEPAGE="https://github.com/zsa/wally-cli" @@ -18,13 +18,27 @@ KEYWORDS="~amd64" DOCS=( README.md license.md ) DEPEND="dev-libs/libusb:1" -RDEPEND="${DEPEND}" +RDEPEND=" + acct-group/plugdev + ${DEPEND} +" src_compile() { - go build + ego build } src_install() { default dobin wally-cli + + udev_dorules "${FILESDIR}"/50-zsa.rules + elog "To use ${PN} as a user, you must be in the plugdev group" +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload }