]>
Commit | Line | Data |
---|---|---|
bbf5053a ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | %bcond_without tests # build without tests | |
5 | ||
6 | Summary: Open Source Continuous File Synchronization | |
7 | Name: syncthing | |
e8d8469c ER |
8 | Version: 0.14.7 |
9 | Release: 1 | |
bbf5053a ER |
10 | License: MPL-2.0 |
11 | Group: Applications/Networking | |
12 | Source0: https://github.com/syncthing/syncthing/archive/v%{version}/%{name}-%{version}.tar.gz | |
e8d8469c | 13 | # Source0-md5: 761a57eaeb8438e08fc1a46b12d6bc2b |
bbf5053a | 14 | URL: https://syncthing.net/ |
e8d8469c | 15 | BuildRequires: golang >= 1.5 |
bbf5053a ER |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %define _enable_debug_packages 0 | |
19 | %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; | |
20 | %define gopath %{_libdir}/golang | |
21 | %define import_path github.com/syncthing/syncthing | |
22 | ||
23 | %description | |
24 | Syncthing replaces proprietary sync and cloud services with something | |
25 | open, trustworthy and decentralized. Your data is your data alone and | |
26 | you deserve to choose where it is stored, if it is shared with some | |
27 | third party and how it's transmitted over the Internet. | |
28 | ||
29 | %prep | |
30 | %setup -q | |
31 | ||
32 | GOPATH=$(pwd)/src | |
33 | install -d $(dirname $GOPATH/%{import_path}) | |
34 | ln -s ../../.. $GOPATH/%{import_path} | |
35 | ln -s .. vendor/src | |
36 | ||
37 | %build | |
38 | export GOPATH=$(pwd) | |
39 | cd src/%{import_path} | |
40 | go run build.go -version "v%{version}" -no-upgrade | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
39a738b8 ER |
44 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man{1,5,7}} |
45 | install -p bin/* $RPM_BUILD_ROOT%{_bindir} | |
46 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
47 | cp -p man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5 | |
48 | cp -p man/*.7 $RPM_BUILD_ROOT%{_mandir}/man7 | |
bbf5053a ER |
49 | |
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %doc README.md AUTHORS CONTRIBUTING.md | |
39a738b8 ER |
56 | %attr(755,root,root) %{_bindir}/stbench |
57 | %attr(755,root,root) %{_bindir}/stcompdirs | |
58 | %attr(755,root,root) %{_bindir}/stdisco | |
e8d8469c | 59 | %attr(755,root,root) %{_bindir}/stdiscosrv |
39a738b8 ER |
60 | %attr(755,root,root) %{_bindir}/stevents |
61 | %attr(755,root,root) %{_bindir}/stfileinfo | |
62 | %attr(755,root,root) %{_bindir}/stfinddevice | |
63 | %attr(755,root,root) %{_bindir}/stgenfiles | |
64 | %attr(755,root,root) %{_bindir}/stindex | |
e8d8469c ER |
65 | %attr(755,root,root) %{_bindir}/strelaypoolsrv |
66 | %attr(755,root,root) %{_bindir}/strelaysrv | |
39a738b8 ER |
67 | %attr(755,root,root) %{_bindir}/stsigtool |
68 | %attr(755,root,root) %{_bindir}/stvanity | |
69 | %attr(755,root,root) %{_bindir}/stwatchfile | |
bbf5053a | 70 | %attr(755,root,root) %{_bindir}/syncthing |
39a738b8 | 71 | %attr(755,root,root) %{_bindir}/testutil |
e8d8469c ER |
72 | %{_mandir}/man1/stdiscosrv.1* |
73 | %{_mandir}/man1/strelaysrv.1* | |
39a738b8 ER |
74 | %{_mandir}/man1/syncthing.1* |
75 | %{_mandir}/man5/syncthing-config.5* | |
76 | %{_mandir}/man5/syncthing-stignore.5* | |
77 | %{_mandir}/man7/syncthing-bep.7* | |
78 | %{_mandir}/man7/syncthing-device-ids.7* | |
79 | %{_mandir}/man7/syncthing-event-api.7* | |
80 | %{_mandir}/man7/syncthing-faq.7* | |
81 | %{_mandir}/man7/syncthing-globaldisco.7* | |
82 | %{_mandir}/man7/syncthing-localdisco.7* | |
83 | %{_mandir}/man7/syncthing-networking.7* | |
84 | %{_mandir}/man7/syncthing-relay.7* | |
85 | %{_mandir}/man7/syncthing-rest-api.7* | |
86 | %{_mandir}/man7/syncthing-security.7* | |
87 | %{_mandir}/man7/syncthing-versioning.7* |