APKBUILD 1.9 KB
Newer Older
1
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
2
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
3
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
4
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
5
pkgname=syncthing
6
pkgver=0.14.49
7
pkgrel=1
8
pkgdesc="Open Source Continuous File Synchronization"
9
url="https://syncthing.net/"
10
arch="all !armhf"
11
license="MPL-2.0"
12
13
pkgusers="$pkgname"
pkggroups="$pkgname"
14
makedepends="go"
15
install="$pkgname.pre-install"
16
subpackages="$pkgname-utils $pkgname-openrc"
17

18
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
Shiz ...'s avatar
Shiz ... committed
19
	$pkgname.initd
20
21
	only-test-with-race-when-provided.patch
	"
22

23
24
builddir="$srcdir/src/github.com/$pkgname/$pkgname"

25
prepare() {
26
27
28
29
        mkdir -p ${builddir%/*}
        mv "$srcdir"/$pkgname-$pkgver "$builddir"/
        cd "$builddir"
        default_prepare
30
31
32
}

build() {
33
	cd "$builddir"
34
	export GOPATH="$srcdir"
35
	go run build.go -no-upgrade -version=v$pkgver
36
37
}

38
39
check() {
	cd "$builddir"
40
	export GOPATH="$srcdir"
Shiz ...'s avatar
Shiz ... committed
41
	go run build.go -no-upgrade test
42
43
}

44
package() {
45
	install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
46
47
	install -D -m755 $builddir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
	install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
48
49
}

50
51
utils() {
	pkgdesc="Syncthing utilities"
52
	for i in $(ls $builddir/bin); do
53
		if ! [ "$i" = "$pkgname" ]; then
54
			install -Dm 755 $builddir/bin/$i $subpkgdir/usr/bin/$i
55
56
57
58
		fi
	done
}

59
sha512sums="7a9974e0d45582c5f184165456ea8fcaca0f7ba07a01b9f8eb2de1e1f0410ca36dc978ddde9c725a2b9d08bae8286fc2ce67595a0e510cbfe22fde9cdd9fc694  syncthing-0.14.49.tar.gz
60
7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5  syncthing.initd
61
3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047  only-test-with-race-when-provided.patch"