From 71d6fde7ebe70a007a37ff32082b4a0853849a3e Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 17 Apr 2022 21:55:48 +0100 Subject: dev-python/trezor: add udev rules Package-Manager: Portage-3.0.30, Repoman-3.0.3 --- dev-python/trezor/files/51-trezor.rules | 10 ++++++++++ dev-python/trezor/trezor-0.12.2.ebuild | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 dev-python/trezor/files/51-trezor.rules diff --git a/dev-python/trezor/files/51-trezor.rules b/dev-python/trezor/files/51-trezor.rules new file mode 100644 index 00000000..f0e0329f --- /dev/null +++ b/dev-python/trezor/files/51-trezor.rules @@ -0,0 +1,10 @@ +# Source: https://data.trezor.io/udev/51-trezor.rules + +# Trezor +SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n" +KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" + +# Trezor v2 +SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c0", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n" +SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c1", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="trezor%n" +KERNEL=="hidraw*", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="53c1", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" diff --git a/dev-python/trezor/trezor-0.12.2.ebuild b/dev-python/trezor/trezor-0.12.2.ebuild index d318c1de..9e22eab1 100644 --- a/dev-python/trezor/trezor-0.12.2.ebuild +++ b/dev-python/trezor/trezor-0.12.2.ebuild @@ -1,10 +1,10 @@ -# Copyright 2019-2021 Gentoo Authors +# Copyright 2019-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python{3_8,3_9} ) -inherit distutils-r1 bash-completion-r1 +inherit distutils-r1 bash-completion-r1 udev DESCRIPTION="Python client for communicating with TREZOR Hardware Wallet" HOMEPAGE="https://trezor.io" @@ -29,7 +29,10 @@ BDEPEND="" S="${WORKDIR}/trezor-firmware-python-v${PV}/python" +distutils_enable_tests pytest + python_install_all() { + udev_dorules "${FILESDIR}/51-trezor.rules" newbashcomp bash_completion.d/trezorctl.sh trezorctl distutils-r1_python_install_all } -- cgit v1.2.3