summaryrefslogtreecommitdiff
path: root/testing/desync/APKBUILD
blob: 3e53f624f0ca7fb435f08115be8f136c8af0e0ba (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
# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=desync
pkgver=0.9.2
pkgrel=2
pkgdesc="Alternative casync implementation"
url="https://github.com/folbricht/desync"
arch="all"
license="BSD-3-Clause"
makedepends="go"
depends="fuse"
source="$pkgname-$pkgver.tar.gz::https://github.com/folbricht/desync/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="$srcdir/go-cache"
export GOTMPDIR="$srcdir"
export GOMODCACHE="$srcdir/go"

build() {
	export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
	mkdir build
	go build -o build ./cmd/desync
}

check() {
	# this test requires the fuse module to be loaded
	if ! grep -Fxq "^fuse " /proc/modules; then
		rm -rf mount-index_linux_test.go
	fi
	go test ./...
}

package() {
	install -Dm755 ./build/desync -t "$pkgdir"/usr/bin
}

sha512sums="
ed4e00d03db0f3b2bd246a94f3723296766fe1954e1e9b92c09e3a9e2708cf3569184742748697a5f64c5aa062d55ede7e5016b2558830f7234a8c797d9ba5bc  desync-0.9.2.tar.gz
"