void-packages/srcpkgs/rclone/template
2021-03-31 23:28:45 -03:00

33 lines
1,006 B
Bash

# Template file for 'rclone'
pkgname=rclone
version=1.55.0
revision=1
wrksrc="rclone-v${version}"
build_style=go
go_import_path=github.com/rclone/rclone
go_ldflags="-extldflags=-fuse-ld=bfd -X github.com/rclone/rclone/fs.Version=v${version}"
short_desc="Rsync for cloud storage"
maintainer="Diogo Leal <diogo@diogoleal.com>"
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=75accdaedad3b82edc185dc8824a19a59c30dc6392de7074b6cd98d1dc2c9040
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() {
RCLONE_CONFIG="/notfound" go test ./...
}
post_install() {
vlicense COPYING
vman rclone.1
}