Created
April 19, 2019 01:01
-
-
Save georgyo/3186aa160f1a331ab299e5872c1bae0f to your computer and use it in GitHub Desktop.
go-ipfs-git changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index 344b4da..c93194c 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -5,13 +5,13 @@ | |
_pkgname=go-ipfs | |
pkgname=$_pkgname-git | |
-pkgver=0.4.9.r4.g864bf47a5 | |
+pkgver=0.4.21dev.r43.g61a0d1a8e | |
pkgrel=1 | |
pkgdesc='global versioned p2p merkledag file system' | |
url="https://github.com/ipfs/$_pkgname" | |
arch=('i686' 'x86_64' 'armv7h') | |
license=('MIT') | |
-makedepends=('git' 'go' 'jq') | |
+makedepends=('git' 'go>=1.12') | |
optdepends=('fuse: for mounting/advanced use' | |
'bash-completion: bash completion support') | |
provides=("$_pkgname") | |
@@ -25,34 +25,19 @@ sha512sums=('SKIP' | |
pkgver() { | |
cd "$srcdir/$_pkgname" | |
- VERSION=$(jq -r .version package.json) | |
+ VERSION=$(grep 'const CurrentVersionNumber' version.go | awk -F\" '{ print $2 }') | |
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() { | |
- mkdir -p "$srcdir"/src/github.com/ipfs | |
- ln -sf "$srcdir/$_pkgname" "$srcdir"/src/github.com/ipfs/go-ipfs | |
-} | |
- | |
build() { | |
- # Required for go get | |
- export GOPATH="$srcdir" | |
- export GOBIN="$srcdir/bin" | |
- export PATH=$PATH:$GOPATH/bin | |
- | |
- msg2 'Installing dependencies...' | |
- cd "$GOPATH"/src | |
- go get -d -v github.com/ipfs/go-ipfs | |
- | |
- msg2 'Building binary...' | |
- cd "$GOPATH"/src/github.com/ipfs/go-ipfs | |
- make install | |
+ cd "$srcdir/$_pkgname" | |
+ make build | |
} | |
package() { | |
msg2 'Packaging binary...' | |
- install -Dm 755 bin/ipfs "${pkgdir}/usr/bin/ipfs" | |
+ install -Dm 755 "${srcdir}/${_pkgname}/cmd/ipfs/ipfs" "${pkgdir}/usr/bin/ipfs" | |
msg2 'Packaging auxiliary files...' | |
cd "$_pkgname" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment