summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD32
2 files changed, 49 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fc9f6499cf42
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = balance-of-satoshis
+ pkgdesc = Commands for working with LND balances.
+ pkgver = 8.0.8
+ pkgrel = 1
+ url = https://github.com/alexbosworth/balanceofsatoshis
+ arch = any
+ license = MIT
+ makedepends = npm
+ depends = nodejs>=10
+ optdepends = lnd-bin
+ noextract = balanceofsatoshis-8.0.8.tgz
+ options = !strip
+ source = https://registry.npmjs.org/balanceofsatoshis/-/balanceofsatoshis-8.0.8.tgz
+ sha256sums = e2a8fa86fbc8d6f4da62ecf0e411e722eb54bbe9fa65a15f708c549b248fe34e
+
+pkgname = balance-of-satoshis
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f5141c00ec81
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Douglas Chimento <dchimento@gmail.com>
+_npmname=balanceofsatoshis
+_npmver=8.0.8
+pkgname="balance-of-satoshis"
+pkgver=${_npmver}
+pkgrel=1
+pkgdesc="Commands for working with LND balances."
+arch=(any)
+url="https://github.com/alexbosworth/balanceofsatoshis"
+license=("MIT")
+depends=("nodejs>=10")
+makedepends=("npm")
+optdepends=('lnd-bin')
+source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$_npmver.tgz")
+noextract=("$_npmname-$_npmver.tgz")
+sha256sums=('e2a8fa86fbc8d6f4da62ecf0e411e722eb54bbe9fa65a15f708c549b248fe34e')
+options=('!strip')
+
+package() {
+ npm install -g --prefix "${pkgdir}/usr" --cache "${srcdir}/npm-cache" "${srcdir}/$_npmname-$_npmver.tgz"
+ # Non-deterministic race in npm gives 777 permissions to random directories.
+ # See https://github.com/npm/cli/issues/1103 for details.
+ find "${pkgdir}/usr" -type d -exec chmod 755 {} +
+
+ # npm gives ownership of ALL FILES to build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "${pkgdir}"
+ install -d -m755 "$pkgdir/usr/share/bash-completion/completions"
+ install -d -m755 "$pkgdir/usr/share/zsh/site-functions"
+ $pkgdir/usr/bin/bos completion bash > "$pkgdir/usr/share/bash-completion/completions/bos"
+ $pkgdir/usr/bin/bos completion zsh > "$pkgdir/usr/share/zsh/site-functions/_bos"
+}