termux-packages/packages/rclone/build.sh

27 lines
790 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-02-09 22:07:41 +01:00
TERMUX_PKG_VERSION=1.46
TERMUX_PKG_REVISION=1
2019-02-09 22:07:41 +01:00
TERMUX_PKG_SHA256=3277e9aca1178707b12d7b7e63247ef3dd0c922d46d63b231f2d60d71e41ade2
TERMUX_PKG_SRCURL=https://github.com/ncw/rclone/releases/download/v${TERMUX_PKG_VERSION}/rclone-v${TERMUX_PKG_VERSION}.tar.gz
termux_step_make_install() {
cd $TERMUX_PKG_SRCDIR
termux_setup_golang
mkdir -p .gopath/src/github.com/ncw
ln -sf "$PWD" .gopath/src/github.com/ncw/rclone
export GOPATH="$PWD/.gopath"
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/
}