diff options
-rw-r--r-- | app-crypt/trezord-go/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/trezord-go/files/51-trezor.rules | 9 | ||||
-rw-r--r-- | app-crypt/trezord-go/files/trezord-go.service | 9 | ||||
-rw-r--r-- | app-crypt/trezord-go/metadata.xml | 8 | ||||
-rw-r--r-- | app-crypt/trezord-go/trezord-go-2.0.6.ebuild | 43 |
5 files changed, 70 insertions, 0 deletions
diff --git a/app-crypt/trezord-go/Manifest b/app-crypt/trezord-go/Manifest new file mode 100644 index 00000000..9326040d --- /dev/null +++ b/app-crypt/trezord-go/Manifest @@ -0,0 +1 @@ +DIST trezord-go-2.0.6.tar.gz 730293 BLAKE2B 3de9054d3a78af2ee95e31300123e6f308487ca10d59a531ba2ebfc3a21e2f556985e546b878c0c067d458a04fc0ee6c95e97fcbc0e85e0d2a0dcc601f8d7eeb SHA512 d60bd27d9638d078e8db7e12650e80862b4ce9ba90dc604b0e4b4fea2978127b907e75babb40a895f51587186aa6a715b19dd1110d561dfbb20e2b928760d8be diff --git a/app-crypt/trezord-go/files/51-trezor.rules b/app-crypt/trezord-go/files/51-trezor.rules new file mode 100644 index 00000000..43b61e66 --- /dev/null +++ b/app-crypt/trezord-go/files/51-trezor.rules @@ -0,0 +1,9 @@ +# From https://github.com/trezor/trezor-common/blob/master/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" diff --git a/app-crypt/trezord-go/files/trezord-go.service b/app-crypt/trezord-go/files/trezord-go.service new file mode 100644 index 00000000..7c4dd22a --- /dev/null +++ b/app-crypt/trezord-go/files/trezord-go.service @@ -0,0 +1,9 @@ +[Unit] +Description=TREZOR Communication Daemon aka TREZOR Bridge + +[Service] +Type=simple +ExecStart=/usr/bin/trezord-go + +[Install] +WantedBy=default.target diff --git a/app-crypt/trezord-go/metadata.xml b/app-crypt/trezord-go/metadata.xml new file mode 100644 index 00000000..82f7232e --- /dev/null +++ b/app-crypt/trezord-go/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bertrand@jacquin.bzh</email> + <name>Bertrand Jacquin</name> + </maintainer> +</pkgmetadata> diff --git a/app-crypt/trezord-go/trezord-go-2.0.6.ebuild b/app-crypt/trezord-go/trezord-go-2.0.6.ebuild new file mode 100644 index 00000000..fcb06ab0 --- /dev/null +++ b/app-crypt/trezord-go/trezord-go-2.0.6.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit golang-build udev systemd + +DESCRIPTION="TREZOR Communication Daemon aka TREZOR Bridge" +HOMEPAGE="https://trezor.io/" +SRC_URI="https://github.com/trezor/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-lang/go" + +EGO_GH="github.com/trezor" +EGO_PN="${EGO_GH}/${PN}" +EGO_S="${WORKDIR}/src/${EGO_PN}" + +DOCS=( + "src/${EGO_PN}/README.md" +) + +src_unpack () { + mkdir -p "${WORKDIR}/src" + mkdir -p "${S}/src/${EGO_GH}" + + cd "${WORKDIR}/src" + unpack ${A} + mv "${P}" "${S}/src/${EGO_PN}" +} + +src_install () { + dobin "${PN}" + + udev_dorules "${FILESDIR}/51-trezor.rules" + systemd_douserunit "${FILESDIR}/${PN}.service" + + default +} |