pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add wip/lnd, the Lightning Network Daemon



Module Name:	pkgsrc-wip
Committed By:	kayront <kaypkgsrc%mailbox.org@localhost>
Pushed By:	kayront
Date:		Tue Sep 10 08:30:09 2019 +0100
Changeset:	c765d350c3bb5a6929cf08f7dbdd788bd3f69be7

Modified Files:
	Makefile
Added Files:
	lnd/DESCR
	lnd/Makefile
	lnd/PLIST
	lnd/distinfo
	lnd/patches/patch-btcwallet_internal_prompt_prompt.go
	lnd/patches/patch-btcwallet_snacl_snacl.go

Log Message:
Add wip/lnd, the Lightning Network Daemon

https://github.com/LightningNetwork/lnd
https://lightning.network/

Initial work only, the port is nonfunctional.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c765d350c3bb5a6929cf08f7dbdd788bd3f69be7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 lnd/DESCR                                          |  1 +
 lnd/Makefile                                       | 51 ++++++++++++++++++++++
 lnd/PLIST                                          |  1 +
 lnd/distinfo                                       | 12 +++++
 .../patch-btcwallet_internal_prompt_prompt.go      | 11 +++++
 lnd/patches/patch-btcwallet_snacl_snacl.go         | 13 ++++++
 7 files changed, 90 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index a79751b3e0..092b9bec66 100644
--- a/Makefile
+++ b/Makefile
@@ -5100,6 +5100,7 @@ SUBDIR+=	zmap
 SUBDIR+=	zola
 SUBDIR+=	zoneminder
 SUBDIR+=	zvbi
+SUBDIR+=	lnd
 
 ${.CURDIR}/PKGDB:
 	${RM} -f ${.CURDIR}/PKGDB
diff --git a/lnd/DESCR b/lnd/DESCR
new file mode 100644
index 0000000000..f680999327
--- /dev/null
+++ b/lnd/DESCR
@@ -0,0 +1 @@
+The Lightning Network Daemon (lnd) - is a complete implementation of a Lightning Network node. lnd has several pluggable back-end chain services including btcd (a full-node), bitcoind, and neutrino (a new experimental light client). The project's codebase uses the btcsuite set of Bitcoin libraries, and also exports a large set of isolated re-usable Lightning Network related libraries within it.
diff --git a/lnd/Makefile b/lnd/Makefile
new file mode 100644
index 0000000000..11a76194f8
--- /dev/null
+++ b/lnd/Makefile
@@ -0,0 +1,51 @@
+# $NetBSD$
+
+DISTNAME=	lnd-source-v0.7.1-beta
+PKGNAME=	${DISTNAME:S/source-v//:S/-beta/beta/}
+DISTFILES=	${DEFAULT_DISTFILES} vendor.tar.gz
+SITES.vendor.tar.gz = \
+    ${MASTER_SITE_GITHUB:=lightningnetwork/${GITHUB_PROJECT}/releases/download/${DISTNAME:S/lnd-source-//}}/
+
+CATEGORIES=	finance
+
+MASTER_SITES=	${MASTER_SITE_GITHUB:=lightningnetwork/}
+GITHUB_RELEASE=	v0.7.1-beta
+GITHUB_PROJECT=	lnd
+
+MAINTAINER=	kaypkgsrc%mailbox.org@localhost
+HOMEPAGE=	https://lightning.network
+COMMENT=	Lightning Network Daemon
+
+LICENSE=	mit
+
+GO_DIST_BASE=	${DISTNAME}
+GO_SRCPATH=	github.com/lightningnetwork/lnd
+
+LND_GO_FLAGS+=	-v -mod=vendor -ldflags
+LND_GO_FLAGS+=	-X ${GO_SRCPATH}/buildCommit=${DISTNAME:S/lnd-source-//}
+
+post-extract:
+	${MKDIR} ${WRKDIR}/${DISTNAME}
+
+# XXX: should GO111MODULE go here? It's required according to the official build instructions
+# (see: https://github.com/lightningnetwork/lnd/releases)
+#
+# TODO: This fix (https://github.com/btcsuite/btcwallet/issues/638) has not been included
+# in v0.7.1-beta yet, so it will need patching to build.
+#
+do-build:
+	${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} \
+		GO111MODULE=on ${GO} install ${LND_GO_FLAGS} ${GO_BUILD_PATTERN} ./cmd/lnd
+	${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} \
+		GO111MODULE=on ${GO} install ${LND_GO_FLAGS} ${GO_BUILD_PATTERN} ./cmd/lncli
+
+# XXX: untested, build is not working
+do-install:
+	${INSTALL_PROGRAM} ${WRKDIR}/cmd/lnd ${DESTDIR}/${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKDIR}/cmd/lncli ${DESTDIR}/${PREFIX}/bin
+
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
+
+# TODO: bmake patch is broken, because stuff is not moved to GO_SRCPATH (it should, right?)
+# on extract.
diff --git a/lnd/PLIST b/lnd/PLIST
new file mode 100644
index 0000000000..48d96a5493
--- /dev/null
+++ b/lnd/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/lnd/distinfo b/lnd/distinfo
new file mode 100644
index 0000000000..43ffc1ad64
--- /dev/null
+++ b/lnd/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+SHA1 (lnd-source-v0.7.1-beta.tar.gz) = 7c44ce1e1a398e4a595b099aa2877168ad9ed5ac
+RMD160 (lnd-source-v0.7.1-beta.tar.gz) = 6a125db403b5b4c9310e8aa653a6c34d4998092b
+SHA512 (lnd-source-v0.7.1-beta.tar.gz) = e1b8ce9ce257c50d8da9d7cf7f9668856971a912bc19c150dd3ddae1275f5796d17a3224d7fd48a1b37377a1f5156871348e7375e653eb28d33c91bb3799792d
+Size (lnd-source-v0.7.1-beta.tar.gz) = 2011855 bytes
+SHA1 (vendor.tar.gz) = 23649c47b9121c1eb604721c3ecdaa4aa6210009
+RMD160 (vendor.tar.gz) = 16b2acc24e1f83cb22aada3a3d4dee7e60bc63f9
+SHA512 (vendor.tar.gz) = 9a46706dafb58f4330d98896606b56497cf304f68e49f0247c0fb1721c345c7644fd71dee409bd1f805df14606952bfbdd2a841d14b285f1909be220166106f9
+Size (vendor.tar.gz) = 5595511 bytes
+SHA1 (patch-btcwallet_internal_prompt_prompt.go) = 2241e0c6ddd3725709afcba640c2471902eb36ff
+SHA1 (patch-btcwallet_snacl_snacl.go) = 893b6f497549b4e9bc39f90313b50996f09a1cb0
diff --git a/lnd/patches/patch-btcwallet_internal_prompt_prompt.go b/lnd/patches/patch-btcwallet_internal_prompt_prompt.go
new file mode 100644
index 0000000000..dd77f49982
--- /dev/null
+++ b/lnd/patches/patch-btcwallet_internal_prompt_prompt.go
@@ -0,0 +1,11 @@
+--- vendor/github.com/btcsuite/btcwallet/internal/prompt/prompt.go.orig	2019-09-10 07:13:06.101605935 +0000
++++ vendor/github.com/btcsuite/btcwallet/internal/prompt/prompt.go	2019-09-10 07:13:24.013671552 +0000
+@@ -14,7 +14,7 @@
+ 
+ 	"github.com/btcsuite/btcutil/hdkeychain"
+ 	"github.com/btcsuite/btcwallet/internal/legacy/keystore"
+-	"github.com/btcsuite/golangcrypto/ssh/terminal"
++	"golang.org/x/crypto/ssh/terminal"
+ )
+ 
+ // ProvideSeed is used to prompt for the wallet seed which maybe required during
diff --git a/lnd/patches/patch-btcwallet_snacl_snacl.go b/lnd/patches/patch-btcwallet_snacl_snacl.go
new file mode 100644
index 0000000000..39ee800378
--- /dev/null
+++ b/lnd/patches/patch-btcwallet_snacl_snacl.go
@@ -0,0 +1,13 @@
+--- vendor/github.com/btcsuite/btcwallet/snacl/snacl.go.orig	2019-09-10 07:13:33.291657578 +0000
++++ vendor/github.com/btcsuite/btcwallet/snacl/snacl.go	2019-09-10 07:13:50.869459789 +0000
+@@ -14,8 +14,8 @@
+ 	"runtime/debug"
+ 
+ 	"github.com/btcsuite/btcwallet/internal/zero"
+-	"github.com/btcsuite/golangcrypto/nacl/secretbox"
+-	"github.com/btcsuite/golangcrypto/scrypt"
++	"golang.org/x/crypto/nacl/secretbox"
++	"golang.org/x/crypto/scrypt"
+ )
+ 
+ var (


Home | Main Index | Thread Index | Old Index