void-packages/srcpkgs/rclone/template
Roberto Ricci 1bfda06cd7 rclone: update to 1.56.0
- pass $go_build_tags to `go test` to avoid failure
- disable tests for `rclone serve docker`
- re-enable tests on ci
- adopt package

Closes: #32114 [via git-merge-pr]
2021-07-22 09:11:15 -04:00

37 lines
1.1 KiB
Bash

# Template file for 'rclone'
pkgname=rclone
version=1.56.0
revision=1
wrksrc="rclone-v${version}"
build_style=go
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}"
short_desc="Rsync for cloud storage"
maintainer="Roberto Ricci <ricci@disroot.org>"
license="MIT"
homepage="https://rclone.org/"
changelog="https://raw.githubusercontent.com/rclone/rclone/master/docs/content/changelog.md"
distfiles="https://downloads.rclone.org/v${version}/rclone-v${version}.tar.gz"
checksum=81d2eda23ebaad0a355aab6ff030712470a42505b94c01c9bb5a9ead9168cedb
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
# equivalent to quicktest target of Makefile
RCLONE_CONFIG="/notfound" go test -tags "$go_build_tags" ./...
}
post_install() {
vlicense COPYING
vman rclone.1
}