termux-packages/packages/ipfs/build.sh

34 lines
1.1 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://ipfs.io/
2018-06-28 16:44:31 +02:00
TERMUX_PKG_DESCRIPTION="A peer-to-peer hypermedia distribution protocol"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
2018-11-09 11:39:18 +01:00
TERMUX_PKG_VERSION=0.4.18
TERMUX_PKG_SHA256=bc03def6ac902d99ae29c60819dad2133af776d3f6779c55781afccaa89cec84
2018-06-28 16:44:31 +02:00
TERMUX_PKG_SRCURL=https://github.com/ipfs/go-ipfs/archive/v${TERMUX_PKG_VERSION}.tar.gz
termux_step_make() {
termux_setup_golang
export GOPATH=${TERMUX_PKG_BUILDDIR}
export GOARCH=${TERMUX_ARCH}
if [ "${TERMUX_ARCH}" = "aarch64" ]; then
2019-02-12 09:23:21 +01:00
export GOARCH="arm64"
2018-06-28 16:44:31 +02:00
elif [ "${TERMUX_ARCH}" = "i686" ]; then
2019-02-12 09:23:21 +01:00
export GOARCH="386"
2018-06-28 16:44:31 +02:00
elif [ "${TERMUX_ARCH}" = "x86_64" ]; then
2019-02-12 09:23:21 +01:00
export GOARCH="amd64"
2018-06-28 16:44:31 +02:00
fi
mkdir -p "${GOPATH}/src/github.com/ipfs"
cp -a "${TERMUX_PKG_SRCDIR}" "${GOPATH}/src/github.com/ipfs/go-ipfs"
cd "${GOPATH}/src/github.com/ipfs/go-ipfs"
make build
}
termux_step_make_install() {
mkdir -p "${TERMUX_PREFIX}/bin"
cp -f "${TERMUX_PKG_BUILDDIR}/src/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs" "${TERMUX_PREFIX}/bin/"
}