summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Parrish2018-07-20 09:42:52 -0400
committerDavid Parrish2018-07-20 09:42:52 -0400
commit9328a32113352fd787dca59be6581e7b9d6a243d (patch)
tree9ca156907869b7691be289617e350ea55759d3e1
downloadaur-9328a32113352fd787dca59be6581e7b9d6a243d.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD53
2 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b04d76af5cd9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Fri Jul 20 13:42:00 UTC 2018
+pkgbase = lnd
+ pkgdesc = The Lighting Network Daemon, for secure off-chain bitcoin transactions.
+ pkgver = 0.4.2_beta
+ pkgrel = 1
+ url = https://github.com/lightningnetwork/lnd
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ depends = glibc
+ provides = lnd
+ provides = lncli
+ conflicts = lnd-git
+ source = lnd::git+https://github.com/lightningnetwork/lnd.git#tag=v0.4.2-beta
+ md5sums = SKIP
+
+pkgname = lnd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..88f05c06a185
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: David Parrish <daveparrish@tutanota.com>
+# URL: https://github.com/lightningnetwork/lnd
+# Upstream: https://github.com/lightningnetwork/lnd
+
+pkgname=('lnd')
+pkgver=0.4.2_beta
+_pkgver="${pkgver//_/-}"
+pkgrel=1
+pkgdesc='The Lighting Network Daemon, for secure off-chain bitcoin transactions.'
+arch=('i686' 'x86_64')
+url='https://github.com/lightningnetwork/lnd'
+license=('MIT')
+depends=('glibc')
+makedepends=('git' 'go')
+provides=('lnd' 'lncli')
+conflicts=('lnd-git')
+source=("$pkgname::git+https://github.com/lightningnetwork/lnd.git#tag=v${_pkgver}")
+md5sums=('SKIP')
+
+# create a fake go path directory and pushd into it
+# $1 real directory
+# $2 gopath directory
+_fake_gopath_pushd() {
+ mkdir -p "$GOPATH/src/${2%/*}"
+ rm -f "$GOPATH/src/$2"
+ ln -rsT "$1" "$GOPATH/src/$2"
+ pushd "$GOPATH/src/$2" >/dev/null || exit
+}
+
+_fake_gopath_popd() {
+ popd >/dev/null || exit
+}
+
+prepare() {
+ # Create GOPATH
+ mkdir -p "$srcdir/GOPATH"
+}
+
+build() {
+ export GOPATH="$srcdir/GOPATH"
+ _fake_gopath_pushd "$pkgname" github.com/lightningnetwork/lnd
+ dep ensure -v
+ make && make install
+ _fake_gopath_popd
+}
+
+package() {
+ for _bin in lnd lncli; do
+ install -Dm 755 "$srcdir/GOPATH/bin/$_bin" -t "$pkgdir/usr/bin";
+ done
+
+ install -D -m644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}