termux-packages/packages/rclone/build.sh

29 lines
905 B
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://rclone.org/
TERMUX_PKG_DESCRIPTION="rsync for cloud storage"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="MIT"
2019-11-21 00:16:20 +01:00
TERMUX_PKG_VERSION=1.50.2
2019-08-29 14:43:51 +02:00
TERMUX_PKG_SRCURL=https://github.com/rclone/rclone/releases/download/v${TERMUX_PKG_VERSION}/rclone-v${TERMUX_PKG_VERSION}.tar.gz
2019-11-21 00:16:20 +01:00
TERMUX_PKG_SHA256=6dd8998a72514d3820d241ae46dc609c0305b742aee3db6aaf6017b46c996091
termux_step_make_install() {
cd $TERMUX_PKG_SRCDIR
termux_setup_golang
2019-08-29 14:43:51 +02:00
mkdir -p .gopath/src/github.com/rclone
ln -sf "$PWD" .gopath/src/github.com/rclone/rclone
export GOPATH="$PWD/.gopath"
2019-06-16 13:49:47 +02:00
# 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/
}