1 |
commit: 49416dec7eb32a66937f1931dae662a865be25ff |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jun 26 12:48:49 2016 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 27 15:02:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49416dec |
7 |
|
8 |
net-p2p/syncthing: bump to 0.13.9 |
9 |
|
10 |
Package-Manager: portage-2.3.0_rc1 |
11 |
|
12 |
net-p2p/syncthing/Manifest | 1 + |
13 |
net-p2p/syncthing/files/relaysrv.systemd.patch | 6 +- |
14 |
net-p2p/syncthing/syncthing-0.13.9.ebuild | 101 +++++++++++++++++++++++++ |
15 |
3 files changed, 105 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
18 |
index f6cfa12..4770a15 100644 |
19 |
--- a/net-p2p/syncthing/Manifest |
20 |
+++ b/net-p2p/syncthing/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST syncthing-0.12.25.tar.gz 4469275 SHA256 0374721434d0cb8bdd9464f63ff9705fe0ca14ab1e20d916780cb6347c91e72d SHA512 5bdb03ae5f76faddd54304994e04683f2a950419c8b4902553ea83d623976039bc05195f77fe59e2ef19615e91da308adc93b05061265e485a9dc941f2b750d4 WHIRLPOOL e6a10d1142dca73174bd9514526ad8f8357c930aa02fb2a2940adbd690fd209bcad15c3397daabd77052c5962d320665362a86fcafca3d19513ca6d06adcfd37 |
23 |
DIST syncthing-0.13.7.tar.gz 4331253 SHA256 c487a489504e48bc7a94f25322da5485c23b3a8e3df2832b2454556ab86552c8 SHA512 8e00355f9774329cb4da1173ad27528213520644c32d5b5ba2345b93787bc762d0498c33ccf2d72e91b770258e8a55d86573934baeff0bc0799416850320c82b WHIRLPOOL 688ef2a997e3e3ad4a23b5baeba6566d39938b007092f40e767db6f6a92c33069bf0ee3afdee2df848a2edfee7846cfb3fbabdc81dcf1a40e795feafae29a221 |
24 |
+DIST syncthing-0.13.9.tar.gz 4334897 SHA256 1b0a00ddbcbc88d8310741a2b0853266fe1980c427aa415ed6faa9f03dd52912 SHA512 07939eb068b417a8dc0ad4a868e5b5fd22ff14297e0b77d0d08fc14631d3ffe957da3ad4a745a4f37bae4a3bed8ac98a859037273b040a8abc88f7d5a67dc871 WHIRLPOOL 264a17f553a7d56a792f4949560dfc4eefbfab6c3dedd07e0ada5ec02d7ed97d2c196aa4a770630b6a3bb02879a9b462ddd5f95d58217f45874ff162206cf6d7 |
25 |
|
26 |
diff --git a/net-p2p/syncthing/files/relaysrv.systemd.patch b/net-p2p/syncthing/files/relaysrv.systemd.patch |
27 |
index 2cff1dc..52417ca 100644 |
28 |
--- a/net-p2p/syncthing/files/relaysrv.systemd.patch |
29 |
+++ b/net-p2p/syncthing/files/relaysrv.systemd.patch |
30 |
@@ -1,7 +1,7 @@ |
31 |
-diff --git src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
32 |
+diff --git a/src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service b/src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
33 |
index b9d3173..7f8e2c0 100644 |
34 |
---- src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
35 |
-+++ src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
36 |
+--- a/src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
37 |
++++ b/src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service |
38 |
@@ -5,7 +5,7 @@ After=network.target |
39 |
[Service] |
40 |
User=syncthing-relaysrv |
41 |
|
42 |
diff --git a/net-p2p/syncthing/syncthing-0.13.9.ebuild b/net-p2p/syncthing/syncthing-0.13.9.ebuild |
43 |
new file mode 100644 |
44 |
index 0000000..74577d2 |
45 |
--- /dev/null |
46 |
+++ b/net-p2p/syncthing/syncthing-0.13.9.ebuild |
47 |
@@ -0,0 +1,101 @@ |
48 |
+# Copyright 1999-2016 Gentoo Foundation |
49 |
+# Distributed under the terms of the GNU General Public License v2 |
50 |
+# $Id$ |
51 |
+ |
52 |
+EAPI=6 |
53 |
+ |
54 |
+EGO_PN="github.com/syncthing/syncthing" |
55 |
+EGIT_COMMIT=v${PV} |
56 |
+ |
57 |
+inherit golang-vcs-snapshot systemd user versionator |
58 |
+ |
59 |
+DESCRIPTION="Open Source Continuous File Synchronization" |
60 |
+HOMEPAGE="https://syncthing.net" |
61 |
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
62 |
+ |
63 |
+LICENSE="MPL-2.0" |
64 |
+SLOT="0" |
65 |
+KEYWORDS="~amd64 ~x86 ~arm" |
66 |
+IUSE="tools" |
67 |
+ |
68 |
+DOCS="README.md AUTHORS CONTRIBUTING.md" |
69 |
+PATCHES=( "${FILESDIR}/relaysrv.systemd.patch" ) |
70 |
+ |
71 |
+pkg_setup() { |
72 |
+ enewgroup ${PN} |
73 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
74 |
+ |
75 |
+ if use tools ; then |
76 |
+ # separate user for relaysrv |
77 |
+ enewgroup ${PN}-relaysrv |
78 |
+ enewuser ${PN}-relaysrv -1 -1 /var/lib/${PN}-relaysrv ${PN}-relaysrv |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+src_compile() { |
83 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
84 |
+ cd src/${EGO_PN} || die |
85 |
+ # If we pass "build" to build.go, it builds only syncthing itself, and |
86 |
+ # places the binary in the root folder. If we do not pass "build", all the |
87 |
+ # tools are built, and all binaries are placed in folder ./bin. |
88 |
+ ST_BUILD="build" |
89 |
+ if use tools ; then |
90 |
+ ST_BUILD="" |
91 |
+ fi |
92 |
+ go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build failed" |
93 |
+} |
94 |
+ |
95 |
+src_test() { |
96 |
+ cd src/${EGO_PN} || die |
97 |
+ go run build.go test || die "test failed" |
98 |
+} |
99 |
+ |
100 |
+src_install() { |
101 |
+ cd src/${EGO_PN} || die |
102 |
+ doman man/*.[157] |
103 |
+ |
104 |
+ if use tools ; then |
105 |
+ dobin bin/syncthing |
106 |
+ exeinto /usr/libexec/syncthing |
107 |
+ for exe in bin/* ; do |
108 |
+ [ "${exe}" = "bin/syncthing" ] || doexe "${exe}" |
109 |
+ done |
110 |
+ else |
111 |
+ dobin syncthing |
112 |
+ fi |
113 |
+ |
114 |
+ # openrc and systemd service files |
115 |
+ systemd_dounit "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \ |
116 |
+ "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.service |
117 |
+ systemd_douserunit "${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
118 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
119 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
120 |
+ |
121 |
+ keepdir /var/{lib,log}/${PN} |
122 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
123 |
+ insinto /etc/logrotate.d |
124 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
125 |
+ |
126 |
+ if use tools ; then |
127 |
+ # openrc and systemd service files |
128 |
+ systemd_dounit "${S}"/src/${EGO_PN}/cmd/relaysrv/etc/linux-systemd/${PN}-relaysrv.service |
129 |
+ newconfd "${FILESDIR}/${PN}-relaysrv.confd" ${PN}-relaysrv |
130 |
+ newinitd "${FILESDIR}/${PN}-relaysrv.initd" ${PN}-relaysrv |
131 |
+ |
132 |
+ keepdir /var/lib/${PN}-relaysrv |
133 |
+ fowners ${PN}-relaysrv:${PN}-relaysrv /var/{lib,log}/${PN} |
134 |
+ |
135 |
+ insinto /etc/logrotate.d |
136 |
+ newins "${FILESDIR}/syncthing-relaysrv.logrotate" syncthing-relaysrv |
137 |
+ fi |
138 |
+} |
139 |
+ |
140 |
+pkg_postinst() { |
141 |
+ if [[ $(get_version_component_range 2) -gt \ |
142 |
+ $(get_version_component_range 2 ${REPLACING_VERSIONS}) ]]; then |
143 |
+ ewarn "Version ${PV} is not protocol-compatible with version" \ |
144 |
+ "0.$(($(get_version_component_range 2) - 1)).x or lower." |
145 |
+ ewarn "Make sure all your devices are running at least version" \ |
146 |
+ "0.$(get_version_component_range 2).0." |
147 |
+ fi |
148 |
+} |