mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
# Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
|
|
# Maintainer: Mike Crute <mike@crute.us>
|
|
pkgname=rclone
|
|
pkgver=1.62.2
|
|
pkgrel=2
|
|
pkgdesc="Rsync for cloud storage"
|
|
url="https://rclone.org/"
|
|
# riscv64 blocked by binutils-gold
|
|
arch="all !riscv64"
|
|
license="MIT"
|
|
makedepends="binutils-gold go"
|
|
checkdepends="fuse"
|
|
options="!check net" # tests fail in CI due filesystem access
|
|
source="rclone-$pkgver.tar.gz::https://github.com/rclone/rclone/archive/refs/tags/v$pkgver.tar.gz"
|
|
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion"
|
|
|
|
export GO111MODULE=on
|
|
export CGO_ENABLED=0
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
go build
|
|
|
|
"$builddir"/rclone genautocomplete bash rclone.bash
|
|
"$builddir"/rclone genautocomplete fish rclone.fish
|
|
"$builddir"/rclone genautocomplete zsh rclone.zsh
|
|
}
|
|
|
|
check() {
|
|
# backend/{ftp,sftp,swift,webdav,seafile}: uses docker(1) for tests
|
|
# backend/{local,memory}: fails in docker envs, but not on real machines
|
|
# fs/rc: fails on ppc64le
|
|
# shellcheck disable=SC2046
|
|
go test $(go list ./... | grep -v \
|
|
-e 'backend/ftp$' \
|
|
-e 'backend/local$' \
|
|
-e 'backend/memory$' \
|
|
-e 'backend/sftp$' \
|
|
-e 'backend/swift$' \
|
|
-e 'backend/webdav$' \
|
|
-e 'backend/seafile$' \
|
|
-e 'fs/rc$'
|
|
)
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$builddir"/rclone \
|
|
"$pkgdir"/usr/bin/rclone
|
|
|
|
mkdir -p "$pkgdir"/sbin
|
|
ln -s /usr/bin/rclone "$pkgdir"/sbin/mount.rclone
|
|
ln -s /usr/bin/rclone "$pkgdir"/usr/bin/rclonefs
|
|
|
|
install -Dm644 "$builddir"/rclone.1 \
|
|
"$pkgdir"/usr/share/man/man1/rclone.1
|
|
|
|
install -Dm644 "$builddir"/rclone.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/rclone
|
|
|
|
install -Dm644 "$builddir"/rclone.fish \
|
|
"$pkgdir"/usr/share/fish/completions/rclone.fish
|
|
|
|
install -Dm644 "$builddir"/rclone.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_rclone
|
|
}
|
|
|
|
cleanup_srcdir() {
|
|
go clean -modcache
|
|
default_cleanup_srcdir
|
|
}
|
|
|
|
sha512sums="
|
|
c29b666ab5573e80f9e61955e987cf3834306bfebce209775f5838a0844e26b5c5ec41d64b8a8444745a99fd8e9c104b18631aeffb438e89839f996221b1c8ca rclone-1.62.2.tar.gz
|
|
"
|