void-packages/srcpkgs/rclone/template
2021-10-08 10:19:10 -03:00

37 lines
1.1 KiB
Bash

# Template file for 'rclone'
pkgname=rclone
version=1.56.2
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://rclone.org/changelog/"
distfiles="https://downloads.rclone.org/v${version}/rclone-v${version}.tar.gz"
checksum=a8813d25c4640e52495fee83e525e76283c63f01d1cce8fbb58d8486b0c20c8a
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
}