From 5a4b5de5b7e38073aefd6ccdd58a52d2f4ab2c1de51ee210b986abb598781207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 11 Jan 2016 16:46:13 +0000 Subject: [PATCH] Accepting request 353066 from home:MargueriteSu:branches:devel:languages:go OBS-URL: https://build.opensuse.org/request/show/353066 OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=50 --- syncthing.changes | 6 ++++++ syncthing.spec | 25 +++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/syncthing.changes b/syncthing.changes index d2341a0..c952572 100644 --- a/syncthing.changes +++ b/syncthing.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 11 11:28:00 UTC 2016 - i@marguerite.su + +- fix build w/ latest go/golang-packaging +- add missing buildrequires + ------------------------------------------------------------------- Mon Jan 11 07:46:12 UTC 2016 - sor.alexei@meowr.ru diff --git a/syncthing.spec b/syncthing.spec index 7ae325d..882229e 100644 --- a/syncthing.spec +++ b/syncthing.spec @@ -25,9 +25,22 @@ Group: Productivity/Networking/File-Sharing Url: https://syncthing.net/ Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz Source1: %{name}.firewall -BuildRequires: go >= 1.3 +BuildRequires: golang-packaging BuildRequires: systemd BuildRequires: systemd-rpm-macros +BuildRequires: golang(github.com/bkaradzic/go-lz4) +BuildRequires: golang(github.com/calmh/du) +BuildRequires: golang(github.com/calmh/luhn) +BuildRequires: golang(github.com/calmh/xdr) +BuildRequires: golang(github.com/juju/ratelimit) +BuildRequires: golang(github.com/kardianos/osext) +BuildRequires: golang(github.com/rcrowley/go-metrics) +BuildRequires: golang(github.com/syndtr/goleveldb) +BuildRequires: golang(github.com/thejerf/suture) +BuildRequires: golang(github.com/vitrun/qart) +BuildRequires: golang(golang.org/x/crypto) +BuildRequires: golang(golang.org/x/net) +BuildRequires: golang(golang.org/x/text) %go_provides %description @@ -46,13 +59,13 @@ sed -i '/^RestartForceExitStatus=/d;s/^\(SuccessExitStatus=\).*$/\12/' \ %endif %build -export GOPATH="$PWD/build" -mkdir -p build/src/github.com/%{name}/%{name} -ls | sed '/^build$/d' | xargs cp -at build/src/github.com/%{name}/%{name} -go run build.go -no-upgrade +%goprep github.com/syncthing/syncthing +# go install -v -ldflags -w -tags noupgrade ./cmd/... +%gobuild -tags "noupgrade" ... %install -install -Dm 0755 bin/%{name} %{buildroot}%{_bindir}/%{name} +# go is statically build, so syncthing binary is enough +install -Dm 0755 %{_builddir}/go/bin/%{name} %{buildroot}%{_bindir}/%{name} install -Dm 0644 etc/linux-systemd/system/%{name}@.service \ %{buildroot}%{_unitdir}/%{name}@.service install -Dm 0644 etc/linux-systemd/user/%{name}.service \