aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2020-03-09 12:22:33 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-03-09 10:51:17 -0300
commit6b4846b21e2d2b45ee11d6be59771ce5836c4e29 (patch)
treeee84805f38d6f945748963dc3777a31980f90dd7 /community
parent57717f897086cdcff8c01e624f86ff4cb55311a6 (diff)
downloadaports-6b4846b21e2d2b45ee11d6be59771ce5836c4e29.tar.bz2
aports-6b4846b21e2d2b45ee11d6be59771ce5836c4e29.tar.xz
community/syncthing: upgrade to 1.3.4
Diffstat (limited to 'community')
-rw-r--r--community/syncthing/APKBUILD58
-rw-r--r--community/syncthing/only-test-with-race-when-provided.patch22
2 files changed, 43 insertions, 37 deletions
diff --git a/community/syncthing/APKBUILD b/community/syncthing/APKBUILD
index bf30ff8562..a529434431 100644
--- a/community/syncthing/APKBUILD
+++ b/community/syncthing/APKBUILD
@@ -3,59 +3,65 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syncthing
-pkgver=1.0.1
-pkgrel=1
+pkgver=1.3.4
+pkgrel=0
pkgdesc="Open Source Continuous File Synchronization"
+options="chmod-clean"
url="https://syncthing.net/"
-arch="all !armhf !armv7 !s390x"
+arch="all"
license="MPL-2.0"
pkgusers="$pkgname"
pkggroups="$pkgname"
makedepends="go"
install="$pkgname.pre-install"
-subpackages="$pkgname-utils $pkgname-openrc"
-
-source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
+subpackages="$pkgname-doc $pkgname-utils $pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/syncthing/syncthing/archive/v$pkgver.tar.gz
only-test-with-race-when-provided.patch
$pkgname.initd
"
-builddir="$srcdir/src/github.com/$pkgname/$pkgname"
-
-prepare() {
- mkdir -p ${builddir%/*}
- mv "$srcdir"/$pkgname-$pkgver "$builddir"/
- cd "$builddir"
- default_prepare
-}
-
build() {
- cd "$builddir"
- export GOPATH="$srcdir"
- go run build.go -no-upgrade -version=v$pkgver
+ # Build syncthing + server utils
+ local cmd
+ for cmd in syncthing stdiscosrv strelaypoolsrv strelaysrv; do
+ echo "Compiling $cmd"
+ go run build.go -no-upgrade -version=v$pkgver install $cmd
+ done
}
check() {
- cd "$builddir"
- export GOPATH="$srcdir"
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 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+
+ # man pages
+ cd "$builddir/man"
+ local file
+ for file in *.1; do
+ install -Dm644 "$file" "$pkgdir"/usr/share/man/man1/"$file"
+ done
+ for file in *.5; do
+ install -Dm644 "$file" "$pkgdir"/usr/share/man/man5/"$file"
+ done
+ for file in *.7; do
+ install -Dm644 "$file" "$pkgdir"/usr/share/man/man7/"$file"
+ done
}
utils() {
- pkgdesc="Syncthing utilities"
- for i in $(ls $builddir/bin); do
+ cd "$builddir/bin"
+ pkgdesc="Syncthing server utilities"
+ for i in *; do
if ! [ "$i" = "$pkgname" ]; then
- install -Dm 755 $builddir/bin/$i $subpkgdir/usr/bin/$i
+ install -Dm 755 "$builddir"/bin/"$i" "$subpkgdir"/usr/bin/"$i"
fi
done
}
-sha512sums="7f9fd48e00fae2f0913eb9eeddadaad1d5d7559164a24020706e70411f8ec43420192c4c9422699be6faa1641a382d5b8627038ca9a5dad38ee0e189970efbb7 syncthing-1.0.1.tar.gz
-3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch
+sha512sums="1584e0856a7c559d4e809b171c6c7aa0cd01ca94a513607bc3ce6543a82ecb454647c990dfed221cf9d3d566b6c5b522f3fc3549aefbb0487111ecf54366f8b8 syncthing-1.3.4.tar.gz
+81bcb6b2e0956624b596201d1de24a3b6fcb10d08761f2c426081350b611295a7f4d47775d175f2ee5dbbb289b98bc022389fc9992f0d31bcdbfde855ceafaf8 only-test-with-race-when-provided.patch
7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd"
diff --git a/community/syncthing/only-test-with-race-when-provided.patch b/community/syncthing/only-test-with-race-when-provided.patch
index 5b8e4c7f4b..236c1e0864 100644
--- a/community/syncthing/only-test-with-race-when-provided.patch
+++ b/community/syncthing/only-test-with-race-when-provided.patch
@@ -1,14 +1,14 @@
Only use -race when -race is also given to build.go on the command line:
x86_64 musl targets do not support the Go race runtime.
-diff -Nru a/build.go b/build.go
---- a/build.go 2017-04-15 07:38:23.000000000 +0000
-+++ b/build.go 2017-05-12 19:26:36.982569748 +0000
-@@ -379,7 +379,7 @@
- func test(pkgs ...string) {
- lazyRebuildAssets()
+
+--- a/build.go
++++ b/build.go
+@@ -364,7 +364,7 @@
-- useRace := runtime.GOARCH == "amd64"
-+ useRace := race && runtime.GOARCH == "amd64"
- switch runtime.GOOS {
- case "darwin", "linux", "freebsd", "windows":
- default:
+ args := []string{"test", "-short", "-timeout", timeout, "-tags", "purego"}
+
+- if runtime.GOARCH == "amd64" {
++ if race && runtime.GOARCH == "amd64" {
+ switch runtime.GOOS {
+ case "darwin", "linux", "freebsd": // , "windows": # See https://github.com/golang/go/issues/27089
+ args = append(args, "-race")