# Contributor: Oleg Titov # Maintainer: Oleg Titov pkgname=go-ipfs pkgver=0.4.23 pkgrel=0 pkgdesc="Inter Platnetary File System (IPFS), a peer-to-peer hypermedia distribution protocol" url="https://ipfs.io/" arch="x86_64 x86 aarch64 armhf armv7" license="MIT Apache-2.0" pkgusers="ipfs" pkggroups="ipfs" options="chmod-clean !check" # No test suite from upstream makedepends="make go bash binutils-gold git" install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-doc $pkgname-openrc $pkgname-bash-completion:bashcomp:noarch" source="$pkgname-$pkgver.tar.gz::https://github.com/ipfs/go-ipfs/archive/v$pkgver.tar.gz ipfs.initd ipfs.confd" builddir="$srcdir/src/github.com/ipfs/go-ipfs" prepare() { export GOPATH="$srcdir" mkdir -p "$(dirname $builddir)" mv "$srcdir"/$pkgname-$pkgver "$builddir"/ default_prepare } build() { export GOPATH="$srcdir" export GOBIN="$GOPATH/bin" make build } package() { install -m755 -D cmd/ipfs/ipfs \ "$pkgdir"/usr/bin/ipfs install -m644 -D -t "$pkgdir/usr/share/doc/$pkgname" README.md install -m755 -D "$srcdir"/ipfs.initd \ "$pkgdir"/etc/init.d/ipfs install -m644 -D "$srcdir"/ipfs.confd \ "$pkgdir"/etc/conf.d/ipfs install -dm750 -o ipfs -g ipfs "$pkgdir"/var/lib/ipfs install -dm755 "$pkgdir"/var/log/ipfs } bashcomp() { depends="" pkgdesc="Bash completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" install -Dm 644 "$builddir"/misc/completion/ipfs-completion.bash \ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname } sha512sums="e763870c9bcb5167a423b11d03989398d598bfc70a2852f7d752f789e2f7c7fc424277ef99abef65c5b2bcbbd17f471ad751fb969daf177e3d68411e630c0b1d go-ipfs-0.4.23.tar.gz 3e51e9a3dca1b991e8549f8354f7c2cfd1bb9b73d7a59557878d5c9ab4189988676d789172af3ba1fd57193ec48ca9125919507b0de7d0400ce0d6166622e556 ipfs.initd c55afeb3efe381d18258ddf00f58325b77156375cf223fb2daa049df056efe22e9139cce0f81dc4c73759dad5097af5f3201414beb5950bd894df9ae8c7c4ed1 ipfs.confd"