termux-packages/packages/rclone/build.sh

30 lines
927 B
Bash

TERMUX_PKG_HOMEPAGE=https://rclone.org/
TERMUX_PKG_DESCRIPTION="rsync for cloud storage"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=1.49.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/rclone/rclone/releases/download/v${TERMUX_PKG_VERSION}/rclone-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=bdb02ac657099a152a30c706323af1355b2152b01f1a47f11f7d15eb8edc18b4
termux_step_make_install() {
cd $TERMUX_PKG_SRCDIR
termux_setup_golang
mkdir -p .gopath/src/github.com/rclone
ln -sf "$PWD" .gopath/src/github.com/rclone/rclone
export GOPATH="$PWD/.gopath"
# google.golang.org/grpc/internal/syscall does not build with GO111MODULE=on
# Remove when possible
export GO111MODULE=off
go build -v -o rclone
# XXX: Fix read-only files which prevents removal of src dir.
chmod u+w -R .
cp rclone $TERMUX_PREFIX/bin/rclone
mkdir -p $TERMUX_PREFIX/share/man/man1/
cp rclone.1 $TERMUX_PREFIX/share/man/man1/
}