syncthing: build for go1.20

This commit is contained in:
Đoàn Trần Công Danh 2023-08-24 21:03:53 +07:00
parent dd44c74ac5
commit ebc2783566

View file

@ -1,7 +1,7 @@
# Template file for 'syncthing' # Template file for 'syncthing'
pkgname=syncthing pkgname=syncthing
version=1.23.7 version=1.23.7
revision=2 revision=3
build_style=go build_style=go
go_import_path="github.com/syncthing/syncthing" go_import_path="github.com/syncthing/syncthing"
go_package=" go_package="
@ -10,6 +10,7 @@ go_package="
${go_import_path}/cmd/syncthing" ${go_import_path}/cmd/syncthing"
go_build_tags="noupgrade" go_build_tags="noupgrade"
go_ldflags="-X github.com/syncthing/syncthing/lib/build.Version=v${version}" go_ldflags="-X github.com/syncthing/syncthing/lib/build.Version=v${version}"
hostmakedepends="go1.20"
short_desc="Open Source Continuous File Synchronization" short_desc="Open Source Continuous File Synchronization"
maintainer="Duncaen <duncaen@voidlinux.org>" maintainer="Duncaen <duncaen@voidlinux.org>"
license="MPL-2.0" license="MPL-2.0"
@ -17,11 +18,11 @@ homepage="https://syncthing.net/"
changelog="https://github.com/syncthing/syncthing/releases" changelog="https://github.com/syncthing/syncthing/releases"
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz" distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
checksum=cc36d6244590f0eeaa1df6f465b617dd7fdbee3dae434d55b272b25580f6e53b checksum=cc36d6244590f0eeaa1df6f465b617dd7fdbee3dae434d55b272b25580f6e53b
export GOTOOLCHAIN=go1.20
broken="GOTOOLCHAIN not supported" broken="GOTOOLCHAIN not supported"
pre_build() { pre_build() {
export GOTOOLCHAIN="go1.20.7"
GOARCH= go generate \ GOARCH= go generate \
github.com/syncthing/syncthing/lib/api/auto \ github.com/syncthing/syncthing/lib/api/auto \
github.com/syncthing/syncthing/cmd/strelaypoolsrv/auto github.com/syncthing/syncthing/cmd/strelaypoolsrv/auto