Commit a8d0af18 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add kubo support

parent c2d3611b
kubo.sh
\ No newline at end of file
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
CURDIR="$(pwd)"
PKGDIR="$(mktemp -d)"
trap "rm -fr $PKGDIR" EXIT
cd $PKGDIR || fatal
erc unpack $TAR && cd kubo || fatal
mkdir -p usr/bin
mv ipfs usr/bin
rm -v install.sh README.md
mkdir -p usr/share/doc/$PRODUCT
mv LICENSE* usr/share/doc/$PRODUCT
VERSION="$(echo "$TAR" | sed -e 's|.*kubo_v||' -e 's|[-_].*||')"
PKGNAME=$PRODUCT-$VERSION
erc pack $CURDIR/$PKGNAME.tar usr || fatal
return_tar $PKGNAME.tar
#!/bin/sh
DESCRIPTION="Kubo - An IPFS implementation in Go from the official site"
SUPPORTEDARCHES="x86_64 x86 aarch64 armhf"
BASEPKGNAME=kubo
PRODUCTALT="stable beta"
# kubo or kubo-beta
if [ "$2" = "beta" ] || epm installed $BASEPKGNAME-beta ; then
PKGNAME=$BASEPKGNAME-beta
# v0.20.0-rc1_linux
# kubo_v*-rc*_linux*.tar.gz
version="*-rc*_"
else
PKGNAME=$BASEPKGNAME
# v0.20.0_linux
# kubo_v*.[0-9]_linux*.tar.gz
version="*.[0-9]_"
fi
. $(dirname $0)/common.sh
arch="$(epm print info -a)"
case "$arch" in
x86_64)
file="linux-amd64.tar.gz"
;;
armhf)
file="linux-arm.tar.gz"
;;
x86)
file="linux-386.tar.gz"
;;
*)
fatal "$arch arch is not supported"
;;
esac
PKGURL="$(eget --list --latest https://github.com/ipfs/kubo/releases ${BASEPKGNAME}_v$version$file)"
epm pack --install $PKGNAME "$PKGURL"
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=kubo
. $(dirname $0)/common.sh
subst "s|^Group:.*|Group: File tools|" $SPEC
subst "s|^License:.*$|License: MIT/Apache-2.0|" $SPEC
subst "s|^URL:.*|URL: https://github.com/ipfs/kubo|" $SPEC
subst "s|^Summary:.*|Summary: An IPFS implementation in Go|" $SPEC
subst '1iAutoReq:no' $SPEC
subst '1iAutoProv:no' $SPEC
subst '1iConflicts: go-ipfs' $SPEC
subst '1iProvides: go-ipfs' $SPEC
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment