From b5a7ae8506002a63571176d6351aca48664e50da Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Thu, 22 Feb 2018 23:27:20 +0000 Subject: app-crypt/trezord-go: TREZOR Communication Daemon aka TREZOR Bridge Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- app-crypt/trezord-go/Manifest | 1 + app-crypt/trezord-go/files/51-trezor.rules | 9 ++++++ app-crypt/trezord-go/files/trezord-go.service | 9 ++++++ app-crypt/trezord-go/metadata.xml | 8 +++++ app-crypt/trezord-go/trezord-go-2.0.6.ebuild | 43 +++++++++++++++++++++++++++ 5 files changed, 70 insertions(+) create mode 100644 app-crypt/trezord-go/Manifest create mode 100644 app-crypt/trezord-go/files/51-trezor.rules create mode 100644 app-crypt/trezord-go/files/trezord-go.service create mode 100644 app-crypt/trezord-go/metadata.xml create mode 100644 app-crypt/trezord-go/trezord-go-2.0.6.ebuild (limited to 'app-crypt') 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 @@ + + + + + bertrand@jacquin.bzh + Bertrand Jacquin + + 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 +} -- cgit v1.2.3