diff options
-rw-r--r-- | finance/electrum/Makefile | 25 | ||||
-rw-r--r-- | finance/electrum/files/ledger_wallet.conf.sample | 13 | ||||
-rw-r--r-- | finance/electrum/files/pkg-message-hwwallet.in | 14 | ||||
-rw-r--r-- | finance/electrum/files/trezor_wallet.conf.sample | 13 |
4 files changed, 65 insertions, 0 deletions
diff --git a/finance/electrum/Makefile b/finance/electrum/Makefile index db7e52582b40..5d7bbe13a0d4 100644 --- a/finance/electrum/Makefile +++ b/finance/electrum/Makefile @@ -3,6 +3,7 @@ PORTNAME= electrum PORTVERSION= 3.0.2 +PORTREVISION= 1 CATEGORIES= finance python MASTER_SITES= https://download.electrum.org/${PORTVERSION}/ \ http://download.electrum.org/${PORTVERSION}/ @@ -32,8 +33,32 @@ USE_PYQT= gui_run sip widgets USE_PYTHON= autoplist distutils optsuffix PYDISTUTILS_PKGNAME= Electrum NO_ARCH= yes +OPTIONS_SUB= yes + +OPTIONS_DEFINE= LEDGER TREZOR +OPTIONS_DEFAULT=LEDGER TREZOR + +LEDGER_DESC= Enable LEDGER Bitcoin hardware wallet support +TREZOR_DESC= Enable TREZOR Bitcoin hardware wallet support + +LEDGER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}btchip-python>0:security/py-btchip-python@${FLAVOR} +TREZOR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trezor>0:security/py-trezor@${FLAVOR} + +LEDGER_PLIST_FILES= "@sample etc/devd/ledger_wallet.conf.sample" +TREZOR_PLIST_FILES= "@sample etc/devd/trezor_wallet.conf.sample" + +LEDGER_SUB_FILES= pkg-message-hwwallet +TREZOR_SUB_FILES= pkg-message-hwwallet post-patch: @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/setup.py +post-install-LEDGER-on: + ${INSTALL_DATA} ${FILESDIR}/ledger_wallet.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/devd + +post-install-TREZOR-on: + ${INSTALL_DATA} ${FILESDIR}/trezor_wallet.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/devd + .include <bsd.port.mk> diff --git a/finance/electrum/files/ledger_wallet.conf.sample b/finance/electrum/files/ledger_wallet.conf.sample new file mode 100644 index 000000000000..a4ab25e0a074 --- /dev/null +++ b/finance/electrum/files/ledger_wallet.conf.sample @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# Allow members of group operator to access hardware wallet devices + +## Ledger Nano S +#notify 301 { +# match "system" "USB"; +# match "subsystem" "DEVICE"; +# match "vendor" "0x2c97"; +# match "product" "0x0001"; +# match "type" "ATTACH"; +# action "/bin/chmod g=rw /dev/$cdev"; +#}; diff --git a/finance/electrum/files/pkg-message-hwwallet.in b/finance/electrum/files/pkg-message-hwwallet.in new file mode 100644 index 000000000000..f4f8236f23eb --- /dev/null +++ b/finance/electrum/files/pkg-message-hwwallet.in @@ -0,0 +1,14 @@ +For hardware wallet devices to work you need to be in the operator group +and need r/w permissions to the appropriate /dev/usb/* device. + +Add a user to operator group: + +% pw groupmod operator -m satoshi + +Edit your configuration: + +%%PREFIX%%/etc/devd/*_wallet.conf + +Then restart devd to load the new rules: + +% /etc/rc.d/devd restart diff --git a/finance/electrum/files/trezor_wallet.conf.sample b/finance/electrum/files/trezor_wallet.conf.sample new file mode 100644 index 000000000000..e75d3649ec0c --- /dev/null +++ b/finance/electrum/files/trezor_wallet.conf.sample @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# Allow members of group operator to access hardware wallet devices + +## SatoshiLabs TREZOR +#notify 301 { +# match "system" "USB"; +# match "subsystem" "DEVICE"; +# match "vendor" "0x534c"; +# match "product" "0x0001"; +# match "type" "ATTACH"; +# action "/bin/chmod g=rw /dev/$cdev"; +#}; |