aboutsummaryrefslogtreecommitdiffstats
path: root/community/syncthing/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/syncthing/APKBUILD')
-rw-r--r--community/syncthing/APKBUILD68
1 files changed, 44 insertions, 24 deletions
diff --git a/community/syncthing/APKBUILD b/community/syncthing/APKBUILD
index 77a8090f650..60ccf1ee129 100644
--- a/community/syncthing/APKBUILD
+++ b/community/syncthing/APKBUILD
@@ -1,12 +1,12 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
-# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Sertonix <sertonix@posteo.net>
pkgname=syncthing
-pkgver=1.6.1
+pkgver=1.27.6
pkgrel=0
pkgdesc="Open Source Continuous File Synchronization"
-options="chmod-clean"
url="https://syncthing.net/"
arch="all"
license="MPL-2.0"
@@ -16,9 +16,24 @@ makedepends="go"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-utils $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/syncthing/syncthing/archive/v$pkgver.tar.gz
+ build-unset-CGO_ENABLED.patch
only-test-with-race-when-provided.patch
$pkgname.initd
"
+options="chmod-clean"
+case "$CARCH" in
+# arm*: oom on tests
+# riscv64: bind error
+arm*|riscv64) options="$options !check" ;;
+esac
+
+# secfixes:
+# 1.15.1-r0:
+# - CVE-2021-21404
+
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
# Build syncthing + server utils
@@ -30,38 +45,43 @@ build() {
}
check() {
- go run build.go -no-upgrade test
+ # shellcheck disable=2046
+ # very flake
+ go test $(go list ./lib/... ./cmd/... | grep -Ev '(lib/model)')
}
package() {
+ local i
+
install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
- install -D -m755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+ install -D -m755 -t "$pkgdir"/usr/bin/ "$builddir"/bin/*
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"
+ # Desktop files so people in Desktop Environments can put them on Autostart
+ install -Dm0644 etc/linux-desktop/*.desktop -t "$pkgdir"/usr/share/applications
+
+ for i in 32 64 128 256 512; do
+ install -Dm644 "$builddir"/assets/logo-"$i".png \
+ "$pkgdir"/usr/share/icons/hicolor/"$i"x"$i"/apps/$pkgname.png
done
- for file in *.7; do
- install -Dm644 "$file" "$pkgdir"/usr/share/man/man7/"$file"
+ install -Dm644 "$builddir"/assets/logo-only.svg \
+ "$pkgdir"/usr/share/icons/hicolor/scalable/apps/$pkgname.svg
+
+ # man pages
+ for i in 1 5 7; do
+ install -Dm644 -t "$pkgdir"/usr/share/man/man"$i"/ "$builddir"/man/*."$i"
done
}
utils() {
- 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"
- fi
- done
+
+ amove 'usr/bin/st*'
}
-sha512sums="49ae4be6adeedeb76c346e2dec5a59e1c2787612595601af140462ff8df9035fe6b2366af78412e13d5070aa149d34904b5c0cf28fa40f1cab2dbf59c175c2db syncthing-1.6.1.tar.gz
+sha512sums="
+a343dec73dab067c0721142e549cb931770c299342b6d864a88d9d64870e3e7d1ba59a17fc6e05eb4e041f5235a77c128461b3a67482ed4786a0a525f674e3be syncthing-1.27.6.tar.gz
+30c96641f073ba732d495e9df4b04a9f00ddb19439b4764c2aef07e4ec4a5f53ec6527210c76dc2d2af8f76a37666e44c57acd444206427a258c1b39b53ee5d0 build-unset-CGO_ENABLED.patch
81bcb6b2e0956624b596201d1de24a3b6fcb10d08761f2c426081350b611295a7f4d47775d175f2ee5dbbb289b98bc022389fc9992f0d31bcdbfde855ceafaf8 only-test-with-race-when-provided.patch
-7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd"
+8c95d8794e10c97d6546a48b07af769e9c1b26870fcc53d524868ca6e57e96ad686ebcd988ddb2f355404cced81b9f19eeba99a7c832eb4641ff0066f7916749 syncthing.initd
+"