aboutsummaryrefslogtreecommitdiffstats
path: root/testing/go-ipfs
diff options
context:
space:
mode:
authorOleg Titov <oleg.titov@gmail.com>2019-04-16 14:44:27 -0500
committerKevin Daudt <kdaudt@alpinelinux.org>2019-04-17 04:52:47 +0000
commit70388465c61914c2a770f91d3202a6001fd3743c (patch)
treeff6cebcf3694b857fb52bee6f7c6740775d60979 /testing/go-ipfs
parent42a27a6b59b209c9db1769bea5cb38304e232c0d (diff)
downloadaports-70388465c61914c2a770f91d3202a6001fd3743c.tar.bz2
aports-70388465c61914c2a770f91d3202a6001fd3743c.tar.xz
testing/go-ipfs: upgrade to 0.4.20, modernize
- Upgrade to 0.4.20 - Modernize - Add cleanup_srcdir() to mitigate new module management system in golang
Diffstat (limited to 'testing/go-ipfs')
-rw-r--r--testing/go-ipfs/APKBUILD37
1 files changed, 17 insertions, 20 deletions
diff --git a/testing/go-ipfs/APKBUILD b/testing/go-ipfs/APKBUILD
index 618ebb9e62..0cd4241b7c 100644
--- a/testing/go-ipfs/APKBUILD
+++ b/testing/go-ipfs/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=go-ipfs
-pkgver=0.4.19
+pkgver=0.4.20
pkgrel=0
pkgdesc="Inter Platnetary File System (IPFS), a peer-to-peer hypermedia distribution protocol"
url="https://ipfs.io/"
@@ -17,24 +17,21 @@ subpackages="$pkgname-doc $pkgname-openrc $pkgname-bash-completion:bashcomp:noar
source="$pkgname-$pkgver.tar.gz::https://github.com/ipfs/go-ipfs/archive/v$pkgver.tar.gz
ipfs.initd
ipfs.confd"
-builddir="$srcdir/$pkgname-$pkgver"
-#builddir="$GOPATH/src/github.com/ipfs/go-ipfs"
+builddir="$srcdir/src/github.com/ipfs/go-ipfs"
prepare() {
+ export GOPATH="$srcdir"
+
+ mkdir -p $(dirname $builddir)
+ mv "$srcdir"/$pkgname-$pkgver "$builddir"/
+
default_prepare
- export GOPATH="$PWD"/.gopath
-# export GOPATH="$builddir"/.gopath
- mkdir -p "$GOPATH"/src/github.com/ipfs
-# ln -sf "$PWD"/go-ipfs-$pkgver "$GOPATH"/src/github.com/ipfs/go-ipfs
- ln -sf "$builddir" "$GOPATH"/src/github.com/ipfs/go-ipfs
}
build() {
- msg2 'Configuring go environment...'
- export PATH="$PATH":"$PWD"/.gopath/bin
- cd "$GOPATH"/src/github.com/ipfs/go-ipfs
+ export GOPATH="$srcdir"
+ export GOBIN="$GOPATH/bin"
- msg2 'Building binary...'
make IPFS_GX_USE_GLOBAL=1 build
}
@@ -45,15 +42,10 @@ check() {
package() {
cd "$builddir"
-# cd $pkgname-$pkgver
- msg2 'Packaging binary...'
install -m755 -D cmd/ipfs/ipfs \
"$pkgdir"/usr/bin/ipfs
-# install -Dm 644 srcdircmd/ipfs/ipfs "$pkgdir"/usr/bin/ipfs
-# install -Dm 644 srcdircmd/ipfs/ipfs "$pkgdir"/usr/bin/ipfs
- msg2 'Packaging auxiliary files...'
install -m644 -D -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
install -m644 -D -t "$pkgdir/usr/share/doc/$pkgname" README.md
install -m755 -D "$srcdir"/ipfs.initd \
@@ -67,14 +59,19 @@ package() {
bashcomp() {
depends=""
- pkgdesc="Bash completions for $pkgname"
+ pkgdesc="Bash completion for $pkgname"
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
- msg2 'Packaging bash completion file...'
install -Dm 644 "$builddir"/misc/completion/ipfs-completion.bash \
"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}
-sha512sums="674bcb5128cf2545f608cd6fde7a67e587822c1e140622a9fa112e93cc7900351f0f641cf1ac728200e43d8463fa09184a3b754fae4b5b6b24484fece3a3f579 go-ipfs-0.4.19.tar.gz
+cleanup_srcdir() {
+ go clean -modcache
+
+ default_cleanup_srcdir
+}
+
+sha512sums="623d085aa65b84f85e96e1d2be3f48113e6484ae4c505a479b0b5f778f11ddec5061145a3e5c9df702ee9cfdadb3cbde1aadc2c7ea9d9d9ad29e226e7120a7dd go-ipfs-0.4.20.tar.gz
3e51e9a3dca1b991e8549f8354f7c2cfd1bb9b73d7a59557878d5c9ab4189988676d789172af3ba1fd57193ec48ca9125919507b0de7d0400ce0d6166622e556 ipfs.initd
c55afeb3efe381d18258ddf00f58325b77156375cf223fb2daa049df056efe22e9139cce0f81dc4c73759dad5097af5f3201414beb5950bd894df9ae8c7c4ed1 ipfs.confd"