3 %bcond_with tests # build with tests
4 %bcond_without tests # build without tests
6 Summary: Open Source Continuous File Synchronization
10 # syncthing (MPLv2.0) bundles
11 # - angular, bootstrap, daterangepicker, fancytree, jQuery, moment (MIT),
12 # - ForkAwesome (MIT and OFL and CC-BY 3.0), and
13 # - a number of go packages (MIT and MPLv2.0 and BSD and ASL 2.0 and CC0 and ISC)
14 License: MPLv2.0 and MIT and OFL and CC-BY and BSD and ASL 2.0 and CC0 and ISC
15 Group: Applications/Networking
16 # Use official release tarball (contains vendored dependencies)
17 # https://github.com/syncthing/syncthing/releases/
18 Source0: https://github.com/syncthing/syncthing/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz
19 # Source0-md5: 4cec3f1ff8da9d62c8918aca70bc9ff3
20 URL: https://syncthing.net/
21 BuildRequires: golang >= 1.14
22 ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _enable_debug_packages 0
26 %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
27 %define gopath %{_libdir}/golang
28 %define import_path github.com/syncthing/syncthing
31 Syncthing replaces proprietary sync and cloud services with something
32 open, trustworthy and decentralized. Your data is your data alone and
33 you deserve to choose where it is stored, if it is shared with some
34 third party and how it's transmitted over the Internet.
39 install -d build/src/$(dirname %{import_path})
40 mv %{name}/{AUTHORS,*.md} .
41 mv %{name} build/src/%{import_path}
44 export GOPATH=$(pwd)/build
45 cd build/src/%{import_path}
47 go run build.go -version "v%{version}" -no-upgrade build
48 go run build.go -version "v%{version}" -no-upgrade install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man{1,5,7}}
54 cd build/src/%{import_path}
55 install -p bin/* $RPM_BUILD_ROOT%{_bindir}
56 cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
57 cp -p man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
58 cp -p man/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
65 %doc README.md AUTHORS CONTRIBUTING.md
66 %attr(755,root,root) %{_bindir}/syncthing
67 %{_mandir}/man1/stdiscosrv.1*
68 %{_mandir}/man1/strelaysrv.1*
69 %{_mandir}/man1/syncthing.1*
70 %{_mandir}/man5/syncthing-config.5*
71 %{_mandir}/man5/syncthing-stignore.5*
72 %{_mandir}/man7/syncthing-bep.7*
73 %{_mandir}/man7/syncthing-device-ids.7*
74 %{_mandir}/man7/syncthing-event-api.7*
75 %{_mandir}/man7/syncthing-faq.7*
76 %{_mandir}/man7/syncthing-globaldisco.7*
77 %{_mandir}/man7/syncthing-localdisco.7*
78 %{_mandir}/man7/syncthing-networking.7*
79 %{_mandir}/man7/syncthing-relay.7*
80 %{_mandir}/man7/syncthing-rest-api.7*
81 %{_mandir}/man7/syncthing-security.7*
82 %{_mandir}/man7/syncthing-versioning.7*