diff options
author | RubenKelevra | 2020-03-26 19:09:47 +0100 |
---|---|---|
committer | RubenKelevra | 2020-03-26 19:09:47 +0100 |
commit | ce3e68de533155212cc68ffe0df5d8b1e457c02f (patch) | |
tree | 306762f4e021bd49f24e9106331ccc2b81a1fdd6 | |
parent | 2e33c1d3febaa1ef6dc49125f2a90b5211f8305e (diff) | |
download | aur-ce3e68de533155212cc68ffe0df5d8b1e457c02f.tar.gz |
update version generation, change build to go-pie
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | ipfs@.service | 10 |
3 files changed, 44 insertions, 51 deletions
@@ -1,28 +1,24 @@ -# Generated by mksrcinfo v8 -# Sat May 13 20:25:16 UTC 2017 pkgbase = go-ipfs-git - pkgdesc = global versioned p2p merkledag file system - pkgver = 0.4.9.r4.g864bf47a5 - pkgrel = 1 + pkgdesc = A peer-to-peer hypermedia distribution protocol + pkgver = 0.4.23.r800.g729e0533f + pkgrel = 2 url = https://github.com/ipfs/go-ipfs - install = go-ipfs-git.install arch = i686 arch = x86_64 arch = armv7h license = MIT + makedepends = go-pie makedepends = git - makedepends = go - makedepends = jq - optdepends = fuse: for mounting/advanced use + optdepends = fuse2: for mounting/advanced use optdepends = bash-completion: bash completion support provides = go-ipfs conflicts = go-ipfs source = git+https://github.com/ipfs/go-ipfs.git source = ipfs.service - source = go-ipfs-git.install + source = ipfs@.service sha512sums = SKIP sha512sums = 1a6bc7fffc3c3640cda3f33c107424edd698c62bd8509731856b8827ea18be1a1845ef0d5ca15325d48d7d871a78daacc011ff9eacea926bc35899850990c1c6 - sha512sums = c31464826150b85c8a521cc27b8e6eb6e2e5ce9fb1c7cb2a38260b28b7c6cd0dedba0fdc41205aba707a1ca317727e524c2d561390256386a5fa93d08100f3be + sha512sums = aed168a35228c4f873e0040d1412f3568bfe1ad1e94ffb8b1a2507058daaf75d7346381d299cf9f0b91951b21553170249ff5f45d5fc060e711cf628ab5e5aad pkgname = go-ipfs-git @@ -1,65 +1,52 @@ -# Maintainer: Jakub "Kubuxu" Sztandera <kubuxu@protonmail.ch> +# Maintainer: @RubenKelevra +# 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-ipfs pkgname=$_pkgname-git -pkgver=0.4.9.r4.g864bf47a5 -pkgrel=1 -pkgdesc='global versioned p2p merkledag file system' +pkgver=0.4.23.r800.g729e0533f +pkgrel=2 +pkgdesc='A peer-to-peer hypermedia distribution protocol' url="https://github.com/ipfs/$_pkgname" arch=('i686' 'x86_64' 'armv7h') license=('MIT') -makedepends=('git' 'go' 'jq') -optdepends=('fuse: for mounting/advanced use' +makedepends=(go-pie git) +optdepends=('fuse2: for mounting/advanced use' 'bash-completion: bash completion support') provides=("$_pkgname") conflicts=("$_pkgname") -source=("git+${url}.git" "ipfs.service" "go-ipfs-git.install") -install="$pkgname.install" +source=("git+${url}.git" + "ipfs.service" + "ipfs@.service") sha512sums=('SKIP' '1a6bc7fffc3c3640cda3f33c107424edd698c62bd8509731856b8827ea18be1a1845ef0d5ca15325d48d7d871a78daacc011ff9eacea926bc35899850990c1c6' - 'c31464826150b85c8a521cc27b8e6eb6e2e5ce9fb1c7cb2a38260b28b7c6cd0dedba0fdc41205aba707a1ca317727e524c2d561390256386a5fa93d08100f3be') + 'aed168a35228c4f873e0040d1412f3568bfe1ad1e94ffb8b1a2507058daaf75d7346381d299cf9f0b91951b21553170249ff5f45d5fc060e711cf628ab5e5aad') 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() { - mkdir -p "$srcdir"/src/github.com/ipfs - ln -sf "$srcdir/$_pkgname" "$srcdir"/src/github.com/ipfs/go-ipfs + #VERSION=$(grep -E "^const CurrentVersionNumber = " version.go | awk '{ print $4 }' | sed 's/"//g') + VERSION=$(git tag | grep -vE "floodsub|sharding-pre" | grep -ve "-dev" | sed 's/-/~/g' | sort --version-sort --reverse | sed 's/~/-/g' | head -n1) + COUNT=$(git rev-list "$VERSION.." --count) + VERSION=$(echo "$VERSION" | sed 's/^v//') + CHKSUM=$(git rev-list master | head -n1) + printf "%s.%s.%s" "$VERSION" "r$COUNT" "g${CHKSUM:0:9}" } 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" - - msg2 'Packaging auxiliary files...' - cd "$_pkgname" - install -Dm 644 ../ipfs.service "$pkgdir/usr/lib/systemd/user/ipfs.service" - install -Dm 644 misc/completion/ipfs-completion.bash "${pkgdir}/usr/share/bash-completions/completions/ipfs" - install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE - install -Dm 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \ - README.md \ - CHANGELOG.md + cd "$srcdir/$_pkgname" + install -Dm 755 cmd/ipfs/ipfs "$pkgdir/usr/bin/ipfs" + install -Dm 644 "$srcdir"/ipfs.service "$pkgdir/usr/lib/systemd/user/ipfs.service" + install -Dm 644 "$srcdir"/ipfs@.service "$pkgdir/usr/lib/systemd/system/ipfs@.service" + install -Dm 644 misc/completion/ipfs-completion.bash "$pkgdir/usr/share/bash-completion/completions/ipfs" + install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/MIT" LICENSE-MIT + install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/APACHE" LICENSE-APACHE + install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md } diff --git a/ipfs@.service b/ipfs@.service new file mode 100644 index 000000000000..853f70bfb5a4 --- /dev/null +++ b/ipfs@.service @@ -0,0 +1,10 @@ +[Unit] +Description=InterPlanetary File System (IPFS) daemon + +[Service] +User=%i +ExecStart=/usr/bin/ipfs daemon +Restart=on-failure + +[Install] +WantedBy=default.target |