Files
horizon-packages/srcpkgs/rclone/template
T
2026-05-02 23:14:03 +02:00

46 lines
1.4 KiB
Bash

# Template file for 'rclone'
pkgname=rclone
version=1.74.0
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} rsync unzip"
short_desc="Rsync for cloud storage"
maintainer="Orphaned <orphan@voidlinux.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=6834040157185e6ae38a6d6d673d63342d6c0f5ed2b244e5235a54d531330297
make_check_pre="env RCLONE_CONFIG=/notfound CI=1"
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
}
pre_check() {
rm -f cmd/mount/mount_test.go
rm -f cmd/mount2/mount_test.go
rm -f cmd/gitannex/e2e_test.go
}
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
}