summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Knapp2018-08-02 16:49:30 -0700
committerJonathan Knapp2018-08-02 16:49:30 -0700
commitd05ab32ea5aa79ebfc3f24ee65b22381f0c8e22e (patch)
tree03c37ded3d61a82fd8ea212cd4a6049258b0a08b
downloadaur-hs-miner-git.tar.gz
init
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD39
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..79ec51d678da
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = hs-miner-git
+ pkgdesc = Handshake decentralized naming system miner
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = http://handshake.org/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = npm
+ makedepends = python2
+ makedepends = gcc
+ makedepends = make
+ depends = nodejs
+ provides = hs-miner
+ conflicts = hs-miner
+ source = hs-miner-git::git+https://github.com/handshake-org/hs-miner.git
+ md5sums = SKIP
+
+pkgname = hs-miner-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cd2602f5d20b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Jonathan Knapp <jaknapp8+aur@gmail.com>
+# Contributor: Christopher Jeffrey
+# URL: https://github.com/handshake-org/hs-miner
+# Upstream: https://github.com/handshake-org/hs-miner
+
+pkgname=hs-miner-git
+pkgver=0.0.1
+pkgrel=1
+pkgdesc='Handshake decentralized naming system miner'
+arch=('i686' 'x86_64')
+url='http://handshake.org/'
+license=('MIT')
+depends=('nodejs')
+makedepends=('git' 'npm' 'python2' 'gcc' 'make')
+provides=('hs-miner')
+conflicts=('hs-miner')
+source=("$pkgname::git+https://github.com/handshake-org/hs-miner.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd $pkgname
+ #git describe | sed 's/^v//;s/-/./g'
+ git describe --tags | sed 's/^v//;s/-/./g'
+}
+
+package() {
+ cd "$pkgname"
+ npm install -g --prefix "$pkgdir"/usr --user root --unsafe-perm
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ #HACK: npm is being lame and only installing a symlink =/
+ rm "$pkgdir/usr/lib/node_modules/hs-miner"
+ find * -exec install -D -m644 "{}" "$pkgdir/usr/lib/node_modules/hs-miner/{}" \;
+ find "$pkgdir/usr/lib/node_modules/hs-miner" -exec chmod +x "{}" \;
+
+ #HACK: remove references to $srcdir & $pkgdir (if you care)
+ # npm install -g removeNPMAbsolutePaths --prefix "$pkgdir"/usr
+ # "$pkgdir"/usr/bin/removeNPMAbsolutePaths "$pkgdir"/usr
+ # npm uninstall -g removeNPMAbsolutePaths --prefix "$pkgdir"/usr
+}