1 |
commit: 64d077fbe443ebc333f532e9ee922e0e4d6f6863 |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jul 5 17:44:06 2016 +0000 |
4 |
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 5 18:24:12 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d077fb |
7 |
|
8 |
net-p2p/syncthing: bump to 0.13.10 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
net-p2p/syncthing/Manifest | 1 + |
13 |
net-p2p/syncthing/syncthing-0.13.10.ebuild | 101 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 102 insertions(+) |
15 |
|
16 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
17 |
index 7416440..bf1ade2 100644 |
18 |
--- a/net-p2p/syncthing/Manifest |
19 |
+++ b/net-p2p/syncthing/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
+DIST syncthing-0.13.10.tar.gz 4292039 SHA256 a86c7948afabc6e7b07f217d5200fb1e36cde5bb13373d99cc67d5dc991ce3be SHA512 199c38644a7e5d43777ca2e497d5304d8e77485d21aeed9a00efc74dd98bfb0c473dd0bf3230b8e1e9742315915419f198bb8d0a9b294d2f6fe918b6e0175812 WHIRLPOOL a6f82ce032455e78122b9958ddab885b187bd7d46e1a00ca64f855d1ad6e3c25538b8304318ce7fba7753bd1ee17a91325a774ed27d8f1bcb635915937742b96 |
22 |
DIST syncthing-0.13.7.tar.gz 4331253 SHA256 c487a489504e48bc7a94f25322da5485c23b3a8e3df2832b2454556ab86552c8 SHA512 8e00355f9774329cb4da1173ad27528213520644c32d5b5ba2345b93787bc762d0498c33ccf2d72e91b770258e8a55d86573934baeff0bc0799416850320c82b WHIRLPOOL 688ef2a997e3e3ad4a23b5baeba6566d39938b007092f40e767db6f6a92c33069bf0ee3afdee2df848a2edfee7846cfb3fbabdc81dcf1a40e795feafae29a221 |
23 |
DIST syncthing-0.13.9.tar.gz 4334897 SHA256 1b0a00ddbcbc88d8310741a2b0853266fe1980c427aa415ed6faa9f03dd52912 SHA512 07939eb068b417a8dc0ad4a868e5b5fd22ff14297e0b77d0d08fc14631d3ffe957da3ad4a745a4f37bae4a3bed8ac98a859037273b040a8abc88f7d5a67dc871 WHIRLPOOL 264a17f553a7d56a792f4949560dfc4eefbfab6c3dedd07e0ada5ec02d7ed97d2c196aa4a770630b6a3bb02879a9b462ddd5f95d58217f45874ff162206cf6d7 |
24 |
|
25 |
diff --git a/net-p2p/syncthing/syncthing-0.13.10.ebuild b/net-p2p/syncthing/syncthing-0.13.10.ebuild |
26 |
new file mode 100644 |
27 |
index 0000000..74577d2 |
28 |
--- /dev/null |
29 |
+++ b/net-p2p/syncthing/syncthing-0.13.10.ebuild |
30 |
@@ -0,0 +1,101 @@ |
31 |
+# Copyright 1999-2016 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+# $Id$ |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+EGO_PN="github.com/syncthing/syncthing" |
38 |
+EGIT_COMMIT=v${PV} |
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/${EGIT_COMMIT}.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 |
+PATCHES=( "${FILESDIR}/relaysrv.systemd.patch" ) |
53 |
+ |
54 |
+pkg_setup() { |
55 |
+ enewgroup ${PN} |
56 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
57 |
+ |
58 |
+ if use tools ; then |
59 |
+ # separate user for relaysrv |
60 |
+ enewgroup ${PN}-relaysrv |
61 |
+ enewuser ${PN}-relaysrv -1 -1 /var/lib/${PN}-relaysrv ${PN}-relaysrv |
62 |
+ fi |
63 |
+} |
64 |
+ |
65 |
+src_compile() { |
66 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
67 |
+ cd src/${EGO_PN} || die |
68 |
+ # If we pass "build" to build.go, it builds only syncthing itself, and |
69 |
+ # places the binary in the root folder. If we do not pass "build", all the |
70 |
+ # tools are built, and all binaries are placed in folder ./bin. |
71 |
+ ST_BUILD="build" |
72 |
+ if use tools ; then |
73 |
+ ST_BUILD="" |
74 |
+ fi |
75 |
+ go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build failed" |
76 |
+} |
77 |
+ |
78 |
+src_test() { |
79 |
+ cd src/${EGO_PN} || die |
80 |
+ go run build.go test || die "test failed" |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ cd src/${EGO_PN} || die |
85 |
+ doman man/*.[157] |
86 |
+ |
87 |
+ if use tools ; then |
88 |
+ dobin bin/syncthing |
89 |
+ exeinto /usr/libexec/syncthing |
90 |
+ for exe in bin/* ; do |
91 |
+ [ "${exe}" = "bin/syncthing" ] || doexe "${exe}" |
92 |
+ done |
93 |
+ else |
94 |
+ dobin syncthing |
95 |
+ fi |
96 |
+ |
97 |
+ # openrc and systemd service files |
98 |
+ systemd_dounit "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \ |
99 |
+ "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.service |
100 |
+ systemd_douserunit "${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
101 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
102 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
103 |
+ |
104 |
+ keepdir /var/{lib,log}/${PN} |
105 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
106 |
+ insinto /etc/logrotate.d |
107 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
108 |
+ |
109 |
+ if use tools ; then |
110 |
+ # openrc and systemd service files |
111 |
+ systemd_dounit "${S}"/src/${EGO_PN}/cmd/relaysrv/etc/linux-systemd/${PN}-relaysrv.service |
112 |
+ newconfd "${FILESDIR}/${PN}-relaysrv.confd" ${PN}-relaysrv |
113 |
+ newinitd "${FILESDIR}/${PN}-relaysrv.initd" ${PN}-relaysrv |
114 |
+ |
115 |
+ keepdir /var/lib/${PN}-relaysrv |
116 |
+ fowners ${PN}-relaysrv:${PN}-relaysrv /var/{lib,log}/${PN} |
117 |
+ |
118 |
+ insinto /etc/logrotate.d |
119 |
+ newins "${FILESDIR}/syncthing-relaysrv.logrotate" syncthing-relaysrv |
120 |
+ fi |
121 |
+} |
122 |
+ |
123 |
+pkg_postinst() { |
124 |
+ if [[ $(get_version_component_range 2) -gt \ |
125 |
+ $(get_version_component_range 2 ${REPLACING_VERSIONS}) ]]; then |
126 |
+ ewarn "Version ${PV} is not protocol-compatible with version" \ |
127 |
+ "0.$(($(get_version_component_range 2) - 1)).x or lower." |
128 |
+ ewarn "Make sure all your devices are running at least version" \ |
129 |
+ "0.$(get_version_component_range 2).0." |
130 |
+ fi |
131 |
+} |