1 |
commit: 63353de9cfe986a38d012943e4480e649f8fd06b |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Nov 1 23:25:38 2016 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 16:17:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63353de9 |
7 |
|
8 |
net-p2p/syncthing: bump to 0.14.10, syntax fixes |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
net-p2p/syncthing/Manifest | 1 + |
13 |
net-p2p/syncthing/syncthing-0.14.10.ebuild | 123 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 124 insertions(+) |
15 |
|
16 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
17 |
index 1cc6b81..4e09d0e 100644 |
18 |
--- a/net-p2p/syncthing/Manifest |
19 |
+++ b/net-p2p/syncthing/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
+DIST syncthing-0.14.10.tar.gz 6439231 SHA256 abd0695f12a4bc1dbb9ac1c5f3a9caf7b20e3c2cdeee9ab3859d66df98070dce SHA512 69f9d7ab3b3df663604d0da272d35abcf47553ae7e0b825d22385a3331848621597d35c6bd4b9591231c1160d9fb2c8d368fb9845f0d2e80aef7833acb829b7a WHIRLPOOL bf63ee69f889ed54f5bded339224a131ef2aa9781df4cbfbfb7d279fe83c9268c9ca350ccbaa3f8509d46297e05754f2454d854d96966ef366340bc05fef29cd |
22 |
DIST syncthing-0.14.5.tar.gz 6387026 SHA256 32979e333a77dcd4e2ba9cb9c74404f9fd06891032c84b1285bcb779c9e132b6 SHA512 c60e3205624e49de34c17a77cf3a8e7af49572a53faa97a6dca7e57a7009c068f70f986e4e3f60774514e3b74a09edff4e6843563456d4ff97b408843a9a06fb WHIRLPOOL 6283cf0cf0440a1333f4a27bdc5fcef389df975d177cd0cd41f7174164c9b9abc79dddbb9a64c394808b8ec4fa77b1f92fd67f2276d9b0277886d1a25437ef4e |
23 |
DIST syncthing-0.14.6.tar.gz 6390369 SHA256 481d9e88db0c3b3e9b0c796fa6dbb62447f0da69022c77f0065370873b0909ff SHA512 2a6d7dda6f014b1fce75d3199afdde517344524356e3881bb3cac035adc53dae3401260f072099a60d31394279e386c1d0e661fe21a5df0f1bf6b9808017ba34 WHIRLPOOL e24ce88d5448d4f599a3de52c049d5eed3531d7072b9dbf731ec684e648b580f02b559e0b72f441b4bc41aeb8500e7e78cc2379aeb029b35c7b91bb7e411970e |
24 |
DIST syncthing-0.14.7.tar.gz 6434379 SHA256 5586f24e10e695bf2a3db1f2bfd2b8bf986753ecbc9919c922e2ba10c0bbb119 SHA512 883c8c7b060b7f216bcaf54393614f56f730772ccda91dc1c08545e26b439dca8532fcda1bd406ba07f32aad747af14174cd8d72be3349f5030d985ac90af0e3 WHIRLPOOL d736c6ade06e81b3de94a3dd72ef7888cfa1f30c3097870fde4ce80d332b9ee2dedfeae5bec9e511d63ac34b4828010147c5ab238a84d807f1c1c2047be28400 |
25 |
|
26 |
diff --git a/net-p2p/syncthing/syncthing-0.14.10.ebuild b/net-p2p/syncthing/syncthing-0.14.10.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000..1b9c505 |
29 |
--- /dev/null |
30 |
+++ b/net-p2p/syncthing/syncthing-0.14.10.ebuild |
31 |
@@ -0,0 +1,123 @@ |
32 |
+# Copyright 1999-2016 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+EGO_PN="github.com/${PN}/${PN}" |
39 |
+ |
40 |
+inherit golang-vcs-snapshot systemd user versionator |
41 |
+ |
42 |
+DESCRIPTION="Open Source Continuous File Synchronization" |
43 |
+HOMEPAGE="https://syncthing.net" |
44 |
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="MPL-2.0" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~x86 ~arm" |
49 |
+IUSE="tools" |
50 |
+ |
51 |
+DOCS="README.md AUTHORS CONTRIBUTING.md" |
52 |
+ |
53 |
+pkg_setup() { |
54 |
+ enewgroup ${PN} |
55 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
56 |
+ |
57 |
+ if use tools ; then |
58 |
+ # separate user for the relay server |
59 |
+ enewgroup strelaysrv |
60 |
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv |
61 |
+ # and his home folder |
62 |
+ keepdir /var/lib/strelaysrv |
63 |
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv |
64 |
+ fi |
65 |
+} |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ default |
69 |
+ sed -i \ |
70 |
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \ |
71 |
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ |
72 |
+ || die |
73 |
+} |
74 |
+ |
75 |
+src_compile() { |
76 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
77 |
+ cd src/${EGO_PN} || die |
78 |
+ # If we pass "build" to build.go, it builds only syncthing itself, and |
79 |
+ # places the binary in the root folder. If we do not pass "build", all the |
80 |
+ # tools are built, and all binaries are placed in folder ./bin. |
81 |
+ ST_BUILD="build" |
82 |
+ if use tools ; then |
83 |
+ ST_BUILD="" |
84 |
+ fi |
85 |
+ go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build failed" |
86 |
+} |
87 |
+ |
88 |
+src_test() { |
89 |
+ cd src/${EGO_PN} || die |
90 |
+ go run build.go test || die "test failed" |
91 |
+} |
92 |
+ |
93 |
+src_install() { |
94 |
+ cd src/${EGO_PN} || die |
95 |
+ doman man/*.[157] |
96 |
+ einstalldocs |
97 |
+ |
98 |
+ if use tools ; then |
99 |
+ dobin bin/syncthing |
100 |
+ exeinto /usr/libexec/syncthing |
101 |
+ local exe |
102 |
+ for exe in bin/* ; do |
103 |
+ [[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}" |
104 |
+ done |
105 |
+ else |
106 |
+ dobin syncthing |
107 |
+ fi |
108 |
+ |
109 |
+ # openrc and systemd service files |
110 |
+ systemd_dounit "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \ |
111 |
+ "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.service |
112 |
+ systemd_douserunit "${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
113 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
114 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
115 |
+ |
116 |
+ keepdir /var/{lib,log}/${PN} |
117 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
118 |
+ insinto /etc/logrotate.d |
119 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
120 |
+ |
121 |
+ if use tools ; then |
122 |
+ # openrc and systemd service files |
123 |
+ systemd_dounit "${S}"/src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service |
124 |
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv |
125 |
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv |
126 |
+ |
127 |
+ insinto /etc/logrotate.d |
128 |
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv |
129 |
+ fi |
130 |
+} |
131 |
+ |
132 |
+pkg_postinst() { |
133 |
+ local v |
134 |
+ for v in ${REPLACING_VERSIONS}; do |
135 |
+ if [[ $(get_version_component_range 2) -gt \ |
136 |
+ $(get_version_component_range 2 ${v}) ]]; then |
137 |
+ ewarn "Version ${PV} is not protocol-compatible with version" \ |
138 |
+ "0.$(($(get_version_component_range 2) - 1)).x or lower." |
139 |
+ ewarn "Make sure all your devices are running at least version" \ |
140 |
+ "0.$(get_version_component_range 2).0." |
141 |
+ fi |
142 |
+ done |
143 |
+ |
144 |
+ # check if user syncthing-relaysrv exists |
145 |
+ # if yes, warn that it has been moved to strelaysrv |
146 |
+ if [[ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]]; then |
147 |
+ ewarn |
148 |
+ ewarn "The user and group for the relay server have been changed" |
149 |
+ ewarn "from syncthing-relaysrv to strelaysrv" |
150 |
+ ewarn "The old user and group are not deleted automatically. Delete them by running:" |
151 |
+ ewarn " userdel -r syncthing-relaysrv" |
152 |
+ ewarn " groupdel syncthing-relaysrv" |
153 |
+ fi |
154 |
+} |