blob: d0e2a5626d6a5ec8bd6690e4ffea2d7b2518d214 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syncthing
pkgver=0.14.27
pkgrel=0
pkgdesc="Open Source Continuous File Synchronization"
url="http://syncthing.net/"
arch="all !ppc64le"
license="MPLv2"
pkgusers="$pkgname"
pkggroups="$pkgname"
makedepends="go"
install="$pkgname.pre-install"
subpackages="$pkgname-utils"
options="!strip"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
$pkgname.confd
$pkgname.initd
only-test-with-race-when-provided.patch
update-sha256-simd-dependency.patch"
builddir="$srcdir/src/github.com/$pkgname/$pkgname"
export GOPATH="$srcdir"
prepare() {
mkdir -p $(dirname "$builddir")
ln -s "$srcdir"/$pkgname-$pkgver "$builddir"
default_prepare
}
build() {
cd "$builddir"
# recent syncthing tarballs have all deps in vendor dir
# no need to use a go dep tool like glide/godep
go run build.go -no-upgrade -version=v$pkgver
}
check() {
cd "$builddir"
go run build.go -no-upgrade test
}
package() {
install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
install -D -m755 $builddir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
utils() {
pkgdesc="Syncthing utilities"
for i in $(ls $builddir/bin); do
if ! [ "$i" = "$pkgname" ]; then
install -Dm 755 $builddir/bin/$i $subpkgdir/usr/bin/$i
fi
done
}
sha512sums="438d3385dc3b9737bc0ec275462b9dc41a630b353443061fddb9e48b184b5cb39e3ccf144fef4e30f4523d1c6a96f2a8a9d87bc27e9734b1f7d7d462c9c15e51 syncthing-0.14.27.tar.gz
b19cc3d802caa33f4d06852de590d2d984c12cf27d0540162cd7195da4f3f149c83c72e7a10f385b32b27fff6f39d33698e7402442a3f32a9da136c5d19059ae syncthing.confd
21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd
3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch
4fa7465a6bbc8c676fd568499abebd22da49019ab79bddef03581f07b533f1a7ec78c2de65597fe1031931c2897cdc088754f5bcc0009ca434ad32eb48503a64 update-sha256-simd-dependency.patch"
|