summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGergely Imreh2019-02-15 09:25:09 +0000
committerGergely Imreh2019-02-15 09:25:09 +0000
commit62aa4e205e7f65830b9bdae3a103bf10fbf8123c (patch)
tree4e4c4299d9f89d54dd8efed1055882e1f05f0223
downloadaur-62aa4e205e7f65830b9bdae3a103bf10fbf8123c.tar.gz
Initial release 0.0.1.r23.g271a6812
Signed-off-by: Gergely Imreh <imrehg@gmail.com>
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD64
2 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3eb719c6000e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Fri Feb 15 09:24:59 UTC 2019
+pkgbase = go-filecoin-git
+ pkgdesc = A decentralized storage network, full node implementation in Go
+ pkgver = 0.0.1.r23.g271a6812
+ pkgrel = 1
+ url = https://github.com/filecoin-project/go-filecoin
+ arch = x86_64
+ license = MIT
+ license = Apache-2.0
+ makedepends = git
+ makedepends = go>=1.11.2
+ makedepends = rust>=1.31.0
+ makedepends = pkgconf
+ provides = go-filecoin
+ conflicts = go-filecoin
+ source = git+https://github.com/filecoin-project/go-filecoin.git
+ sha512sums = SKIP
+
+pkgname = go-filecoin-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8dd562ceb865
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Gergely Imreh <imrehg@gmail.com>
+# This package is heavily inspired by go-ipfs-git, wich has the following contributors:
+# Contributor: Jakub "Kubuxu" Sztandera <kubuxu@protonmail.ch>
+# Contributor: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
+# Contributor: kpcyrd <git@rxv.cc>
+# Contributor: Ian Naval <ianonavy@gmail.com>
+
+_pkgname=go-filecoin
+pkgname=$_pkgname-git
+pkgver=0.0.1.r23.g271a6812
+pkgrel=1
+pkgdesc='A decentralized storage network, full node implementation in Go'
+_organization='filecoin-project'
+url="https://github.com/$_organization/$_pkgname"
+arch=('x86_64')
+license=('MIT' 'Apache-2.0')
+makedepends=('git' 'go>=1.11.2' 'rust>=1.31.0' 'pkgconf')
+optdepends=()
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("git+${url}.git")
+
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ VERSION=$(jq -r .version package.json)
+ REST=$(git describe --long --tags | sed -e 's/^v//' -e 's/^\(.*\)-\([0-9]*\)-\(g[0-9a-f]*\)$/r\2.\3/')
+ printf "%s.%s" "$VERSION" "$REST" | sed -e 's/-//g'
+}
+
+prepare() {
+ # Get all the submodules as well
+ cd "${srcdir}/${_pkgname}"
+ git submodule update --init --recursive
+
+ # Set up go build environment
+ local targetorg="${srcdir}/src/github.com/${_organization}"
+ local targetrepo="${targetorg}/${_pkgname}"
+ mkdir -p "${targetorg}"
+ if [ ! -e "${targetrepo}" ]; then
+ ln -sf "${srcdir}/${_pkgname}" "${targetrepo}"
+ fi
+}
+
+build() {
+ # Required for go get
+ export GOPATH="$srcdir"
+ export GOBIN="$srcdir/bin"
+ export PATH=$PATH:$GOPATH/bin
+
+ msg2 'Installing dependencies...'
+ cd "$GOPATH/src/github.com/${_organization}/${_pkgname}"
+ make deps
+
+ msg2 'Building binary...'
+ make all
+}
+
+package() {
+ cd "${srcdir}/src/github.com/${_organization}/${_pkgname}"
+
+ install -Dm 755 go-filecoin "${pkgdir}/usr/bin/go-filecoin"
+}