2018-07-01 23:28:36 +02:00
|
|
|
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"
|
2019-05-16 18:54:59 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
|
2019-08-07 23:50:29 +02:00
|
|
|
TERMUX_PKG_VERSION=0.4.22
|
2019-09-03 23:08:41 +02:00
|
|
|
TERMUX_PKG_REVISION=1
|
|
|
|
# Use a snapshot to fix building with go 1.13:
|
|
|
|
#TERMUX_PKG_SRCURL=https://github.com/ipfs/go-ipfs/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
|
|
|
TERMUX_PKG_SRCURL=https://github.com/ipfs/go-ipfs/archive/d5977fc4759137f13c8980323d577759dad3d923.zip
|
|
|
|
TERMUX_PKG_SHA256=7d8c791489b5de14aa72a78485d5ef87ada205b185b63d25467f42692e5d6d8d
|
2018-06-28 16:44:31 +02:00
|
|
|
|
|
|
|
termux_step_make() {
|
|
|
|
termux_setup_golang
|
|
|
|
|
|
|
|
export GOPATH=${TERMUX_PKG_BUILDDIR}
|
|
|
|
export GOARCH=${TERMUX_ARCH}
|
|
|
|
|
|
|
|
if [ "${TERMUX_ARCH}" = "aarch64" ]; then
|
2019-04-17 23:57:24 +02:00
|
|
|
GOARCH="arm64"
|
2018-06-28 16:44:31 +02:00
|
|
|
elif [ "${TERMUX_ARCH}" = "i686" ]; then
|
2019-04-17 23:57:24 +02:00
|
|
|
GOARCH="386"
|
2018-06-28 16:44:31 +02:00
|
|
|
elif [ "${TERMUX_ARCH}" = "x86_64" ]; then
|
2019-04-17 23:57:24 +02:00
|
|
|
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
|
2019-04-17 23:57:24 +02:00
|
|
|
|
|
|
|
# Fix folders without write permissions preventing which fails repeating builds:
|
|
|
|
cd $TERMUX_PKG_BUILDDIR
|
|
|
|
find . -type d -exec chmod u+w {} \;
|
2018-06-28 16:44:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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/"
|
|
|
|
}
|