From a73390ee4f6f3d501283ae5df9af128077ee3580eb40ad462163da6131dae404 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Tue, 12 Jan 2016 08:23:33 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=51 --- syncthing.changes | 6 ------ syncthing.spec | 26 ++++++-------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/syncthing.changes b/syncthing.changes index c952572..d2341a0 100644 --- a/syncthing.changes +++ b/syncthing.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -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 882229e..a3dc320 100644 --- a/syncthing.spec +++ b/syncthing.spec @@ -25,23 +25,9 @@ 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: golang-packaging +BuildRequires: go >= 1.3 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 Syncthing replaces proprietary sync and cloud services with @@ -59,13 +45,13 @@ sed -i '/^RestartForceExitStatus=/d;s/^\(SuccessExitStatus=\).*$/\12/' \ %endif %build -%goprep github.com/syncthing/syncthing -# go install -v -ldflags -w -tags noupgrade ./cmd/... -%gobuild -tags "noupgrade" ... +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 %install -# go is statically build, so syncthing binary is enough -install -Dm 0755 %{_builddir}/go/bin/%{name} %{buildroot}%{_bindir}/%{name} +install -Dm 0755 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 \