aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finance/Makefile1
-rw-r--r--finance/electrum2/Makefile64
-rw-r--r--finance/electrum2/distinfo3
-rw-r--r--finance/electrum2/files/ledger_wallet.conf.sample13
-rw-r--r--finance/electrum2/files/patch-setup.py15
-rw-r--r--finance/electrum2/files/pkg-message-hwwallet.in14
-rw-r--r--finance/electrum2/files/trezor_wallet.conf.sample13
-rw-r--r--finance/electrum2/pkg-descr7
8 files changed, 130 insertions, 0 deletions
diff --git a/finance/Makefile b/finance/Makefile
index c33501b70ce2..add576b70806 100644
--- a/finance/Makefile
+++ b/finance/Makefile
@@ -26,6 +26,7 @@
SUBDIR += bitcoin-armory
SUBDIR += cbb
SUBDIR += electrum
+ SUBDIR += electrum2
SUBDIR += expense
SUBDIR += fixc
SUBDIR += frontaccounting
diff --git a/finance/electrum2/Makefile b/finance/electrum2/Makefile
new file mode 100644
index 000000000000..c9c8319a16a9
--- /dev/null
+++ b/finance/electrum2/Makefile
@@ -0,0 +1,64 @@
+# Created by: Neil Booth
+# $FreeBSD$
+
+PORTNAME= electrum
+PORTVERSION= 2.9.3
+PORTREVISION= 2
+CATEGORIES= finance python
+MASTER_SITES= https://download.electrum.org/${PORTVERSION}/ \
+ http://download.electrum.org/${PORTVERSION}/
+PKGNAMESUFFIX= 2
+DISTNAME= Electrum-${PORTVERSION}
+
+MAINTAINER= ehaupt@FreeBSD.org
+COMMENT= Easy to use Bitcoin client (legacy version)
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENCE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dnspython>0:dns/py-dnspython \
+ ${PYTHON_PKGNAMEPREFIX}ecdsa>0:security/py-ecdsa \
+ ${PYTHON_PKGNAMEPREFIX}jsonrpclib>0:devel/py-jsonrpclib \
+ ${PYTHON_PKGNAMEPREFIX}pbkdf2>=1.3:security/py-pbkdf2 \
+ ${PYTHON_PKGNAMEPREFIX}protobuf>=2.6.0:devel/py-protobuf \
+ ${PYTHON_PKGNAMEPREFIX}pyaes>0:security/py-pyaes \
+ ${PYTHON_PKGNAMEPREFIX}pysocks>=0:net/py-pysocks \
+ ${PYTHON_PKGNAMEPREFIX}requests>=2.4.3:www/py-requests \
+ ${PYTHON_PKGNAMEPREFIX}qrcode>=5.1:textproc/py-qrcode
+
+CONFLICTS_INSTALL= electrum-3.*
+
+USES= desktop-file-utils pyqt:4 python:-2.7
+USE_PYQT= gui_run
+USE_PYTHON= autoplist distutils
+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
+TREZOR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trezor>0:security/py-trezor
+
+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/electrum2/distinfo b/finance/electrum2/distinfo
new file mode 100644
index 000000000000..14110efa686d
--- /dev/null
+++ b/finance/electrum2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1505652872
+SHA256 (Electrum-2.9.3.tar.gz) = c2192d4df6490fdc6e6f9f85b05db0e3915683a016a43ed444ebbc51ccfa0e34
+SIZE (Electrum-2.9.3.tar.gz) = 2389367
diff --git a/finance/electrum2/files/ledger_wallet.conf.sample b/finance/electrum2/files/ledger_wallet.conf.sample
new file mode 100644
index 000000000000..a4ab25e0a074
--- /dev/null
+++ b/finance/electrum2/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/electrum2/files/patch-setup.py b/finance/electrum2/files/patch-setup.py
new file mode 100644
index 000000000000..14c388af005a
--- /dev/null
+++ b/finance/electrum2/files/patch-setup.py
@@ -0,0 +1,15 @@
+--- setup.py.orig 2017-03-23 01:56:41 UTC
++++ setup.py
+@@ -21,12 +21,6 @@ if platform.system() in ['Linux', 'FreeB
+ parser.add_argument('--root=', dest='root_path', metavar='dir', default='/')
+ opts, _ = parser.parse_known_args(sys.argv[1:])
+ usr_share = os.path.join(sys.prefix, "share")
+- if not os.access(opts.root_path + usr_share, os.W_OK) and \
+- not os.access(opts.root_path, os.W_OK):
+- if 'XDG_DATA_HOME' in os.environ.keys():
+- usr_share = os.environ['XDG_DATA_HOME']
+- else:
+- usr_share = os.path.expanduser('~/.local/share')
+ data_files += [
+ (os.path.join(usr_share, 'applications/'), ['electrum.desktop']),
+ (os.path.join(usr_share, 'pixmaps/'), ['icons/electrum.png'])
diff --git a/finance/electrum2/files/pkg-message-hwwallet.in b/finance/electrum2/files/pkg-message-hwwallet.in
new file mode 100644
index 000000000000..f4f8236f23eb
--- /dev/null
+++ b/finance/electrum2/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/electrum2/files/trezor_wallet.conf.sample b/finance/electrum2/files/trezor_wallet.conf.sample
new file mode 100644
index 000000000000..e75d3649ec0c
--- /dev/null
+++ b/finance/electrum2/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";
+#};
diff --git a/finance/electrum2/pkg-descr b/finance/electrum2/pkg-descr
new file mode 100644
index 000000000000..d3e1ead6d6ef
--- /dev/null
+++ b/finance/electrum2/pkg-descr
@@ -0,0 +1,7 @@
+Electrum is an easy to use Bitcoin client. It protects you from
+losing coins in a backup mistake or computer failure, because your
+wallet can be recovered from a secret phrase. There is no waiting
+time when you start the client, because it does not download the
+Bitcoin blockchain.
+
+WWW: http://electrum.org/