aboutsummaryrefslogtreecommitdiffstats
path: root/community/rclone/APKBUILD
blob: 145de9a6bbccc82ac02bfbca8de8905536245671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=rclone
pkgver=1.51.0
pkgrel=1
pkgdesc="Rsync for cloud storage"
url="https://rclone.org/"
arch="all"
license="MIT"
makedepends="binutils-gold go"
options="net"
source="rclone-$pkgver.tar.gz::https://github.com/ncw/rclone/archive/v$pkgver.tar.gz"
subpackages="$pkgname-doc"

export GO111MODULE=on
export GOPATH="$srcdir"
export CGO_ENABLED=0

build() {
	go build
}

check() {
	# backend/{ftp,sftp,swift,webdav}: uses docker(1) for tests
	# backend/{local,memory}: fails in docker envs, but not on real machines
	# fs/rc: fails on ppc64le
	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 'fs/rc$'
		)
}

package() {
	install -Dm755 "$builddir"/"$pkgname" \
		"$pkgdir"/usr/bin/"$pkgname"

	install -Dm644 "$builddir"/"$pkgname".1 \
		"$pkgdir"/usr/share/man/man1/"$pkgname".1
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="b0881e09b75093abe4d31e95425a90513aed4a16d9e2dbf79023c9dc68875b90a1332204879530c450a16ab9cac475d967f7657d6f810a1e0f0d84b88d7de916  rclone-1.51.0.tar.gz"