From a7edb74f3aa9a9bf53b61761262bbc7b4d37bb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Fri, 14 May 2021 22:44:30 +0200 Subject: [PATCH 1/2] New package: wally-udev-2.1.1 --- srcpkgs/wally-udev/INSTALL.msg | 3 +++ srcpkgs/wally-udev/template | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 srcpkgs/wally-udev/INSTALL.msg create mode 100644 srcpkgs/wally-udev/template diff --git a/srcpkgs/wally-udev/INSTALL.msg b/srcpkgs/wally-udev/INSTALL.msg new file mode 100644 index 000000000000..6313b5615bad --- /dev/null +++ b/srcpkgs/wally-udev/INSTALL.msg @@ -0,0 +1,3 @@ +Please add your user to the group 'plugdev' by executing the following: + +usermod -aG plugdev "$USER" diff --git a/srcpkgs/wally-udev/template b/srcpkgs/wally-udev/template new file mode 100644 index 000000000000..f91b892277a4 --- /dev/null +++ b/srcpkgs/wally-udev/template @@ -0,0 +1,23 @@ +# Template file for 'wally-udev' +pkgname=wally-udev +version=2.1.1 +revision=1 +build_style=fetch +short_desc="udev rules for ZSA keyboards, for usage with wally and oryx" +maintainer="Jan Christian Grünhage " +license="MIT" +homepage="https://github.com/zsa/wally" +distfiles="https://github.com/zsa/wally/blob/${version}/dist/linux64/50-oryx.rules +https://github.com/zsa/wally/blob/${version}/dist/linux64/50-wally.rules +https://github.com/zsa/wally/blob/${version}/license.md" +checksum="028ea9fc77249bdfc2b8af78f484798d2052a6cadc21605efdad20586e2c76a8 + a0db828544bcc8e73a85029f6fc233a60e08f272d2468dfb7c2c885afb5eed7a + 480cc372027082145d772db299a1826b3adb89a77e251c0c38dbe537148c0a10" +conf_files="/usr/lib/udev/rules.d/50-wally.rules /usr/lib/udev/rules.d/50-oryx.rules" +system_groups="plugdev" + +do_install() { + vlicense license.md + vinstall 50-oryx.rules 0644 /usr/lib/udev/rules.d + vinstall 50-wally.rules 0644 /usr/lib/udev/rules.d +} From 7d11a1869ff717c8712fa01195e3ddc93de208da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Fri, 14 May 2021 22:23:49 +0200 Subject: [PATCH 2/2] wally-cli: don't vendor udev rules So far, the udev rules contained in this package were manually maintained, which is probably the reason that the necessary rules for using the Moonlander keyboard with their training software, Oryx, wasn't present. I've created a new package, wally-udev, which fetches the udev rules from the upstream repo instead. As the build process for wally itself (which should not be confused with wally-cli) is completely undocumented, I've not done this "properly" (which would be packaging wally and having wally-udev be a subpackage of wally, which is then depended upon by wally-cli) for now, but this is already a step in the right direction IMO. --- srcpkgs/wally-cli/INSTALL.msg | 3 --- srcpkgs/wally-cli/files/50-wally.rules | 11 ----------- srcpkgs/wally-cli/template | 12 +++++------- 3 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 srcpkgs/wally-cli/INSTALL.msg delete mode 100644 srcpkgs/wally-cli/files/50-wally.rules diff --git a/srcpkgs/wally-cli/INSTALL.msg b/srcpkgs/wally-cli/INSTALL.msg deleted file mode 100644 index 6313b5615bad..000000000000 --- a/srcpkgs/wally-cli/INSTALL.msg +++ /dev/null @@ -1,3 +0,0 @@ -Please add your user to the group 'plugdev' by executing the following: - -usermod -aG plugdev "$USER" diff --git a/srcpkgs/wally-cli/files/50-wally.rules b/srcpkgs/wally-cli/files/50-wally.rules deleted file mode 100644 index 742cde5c1f91..000000000000 --- a/srcpkgs/wally-cli/files/50-wally.rules +++ /dev/null @@ -1,11 +0,0 @@ -# These rules are derived from the instructions at -# https://github.com/zsa/wally/wiki/Linux-install#2-create-a-udev-rule-file - -# Teensy 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" - -# STM32 rules for the Moonlander and Planck EZ -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" \ No newline at end of file diff --git a/srcpkgs/wally-cli/template b/srcpkgs/wally-cli/template index 3c70966e7b68..2f98b8569bcb 100644 --- a/srcpkgs/wally-cli/template +++ b/srcpkgs/wally-cli/template @@ -1,23 +1,21 @@ # Template file for 'wally-cli' pkgname=wally-cli version=2.0.0 -revision=1 +revision=2 wrksrc="wally-cli-${version}-linux" build_style=go go_import_path="github.com/zsa/wally-cli" hostmakedepends="pkg-config" makedepends="libusb-devel pkg-config go-bindata" +depends="wally-udev" short_desc="Flashing firmware for ZSA keyboards" maintainer="Wayne Van Son " license="MIT" homepage="https://www.zsa.io/wally/" distfiles="https://github.com/zsa/wally-cli/archive/${version}-linux.tar.gz" -checksum="2641c7deededeeba1aecf6b3ae3e87050a0cfd81c8b41323b2304ebe21e61745" -conf_files="/usr/lib/udev/rules.d/50-wally.rules" -system_groups="plugdev" +checksum=2641c7deededeeba1aecf6b3ae3e87050a0cfd81c8b41323b2304ebe21e61745 post_install() { - # vendoring license is obsolete in the next release - vlicense "$FILESDIR/LICENSE" - vinstall "$FILESDIR/50-wally.rules" 0644 /usr/lib/udev/rules.d + # vendoring license is obsolete in the next release + vlicense "$FILESDIR/LICENSE" }