54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
# Template file for 'rclone'
|
|
pkgname=rclone
|
|
version=1.65.2
|
|
revision=1
|
|
build_style=go
|
|
build_helper=qemu
|
|
go_import_path=github.com/rclone/rclone
|
|
go_build_tags="noselfupdate"
|
|
go_ldflags="-extldflags=-fuse-ld=bfd -X github.com/rclone/rclone/fs.Version=v${version}"
|
|
depends="mime-types"
|
|
checkdepends="${depends}"
|
|
short_desc="Rsync for cloud storage"
|
|
maintainer="Roberto Ricci <io@r-ricci.it>"
|
|
license="MIT"
|
|
homepage="https://rclone.org/"
|
|
changelog="https://rclone.org/changelog/"
|
|
distfiles="https://downloads.rclone.org/v${version}/rclone-v${version}.tar.gz"
|
|
checksum=1305c913ac3684d02ce2bade0a23a2115c1ec03c9447d1562bb6cd9fa2573412
|
|
# some tests fail on CI
|
|
make_check=ci-skip
|
|
|
|
pre_build() {
|
|
if [ "$CROSS_BUILD" ] && [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
# XXX: when cross building, the binary has a textrel, which segfaults when
|
|
# launched on musl
|
|
# FIXME: linkers for the musl toolchains should reject textrels entirely
|
|
export CGO_ENABLED=0
|
|
fi
|
|
}
|
|
|
|
do_check() {
|
|
rm cmd/serve/docker/docker_test.go
|
|
rm cmd/mount/mount_test.go
|
|
rm cmd/mount2/mount_test.go
|
|
|
|
# could time out on i686 and it's deprecated
|
|
# https://github.com/rclone/rclone/issues/5784#issuecomment-961520934
|
|
rm backend/cache/cache_test.go
|
|
|
|
# equivalent to quicktest target of Makefile
|
|
RCLONE_CONFIG="/notfound" go test -tags "$go_build_tags" ./...
|
|
}
|
|
|
|
post_install() {
|
|
ln -sf rclone ${DESTDIR}/usr/bin/mount.rclone
|
|
vlicense COPYING
|
|
vman rclone.1
|
|
|
|
for shell in bash zsh fish; do
|
|
vtargetrun ${DESTDIR}/usr/bin/rclone genautocomplete $shell completion.$shell
|
|
vcompletion completion.$shell $shell
|
|
done
|
|
}
|