1 |
commit: 2d8e04c102d28f31b92b0c9b16e9670c9b817233 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 12 10:12:03 2019 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 12 10:12:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d8e04c1 |
7 |
|
8 |
net-p2p/syncthing: bump to version 1.0.1 and EAPI 7 |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
net-p2p/syncthing/Manifest | 1 + |
14 |
net-p2p/syncthing/syncthing-1.0.1.ebuild | 92 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 93 insertions(+) |
16 |
|
17 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
18 |
index 7ee4f9d3aaa..a69e230c283 100644 |
19 |
--- a/net-p2p/syncthing/Manifest |
20 |
+++ b/net-p2p/syncthing/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST syncthing-0.14.52.tar.gz 10583112 BLAKE2B cceaf0aba9dff96df0551d7aab855cb716be3d252fd677b82e20560f0a2e9eabf513ca7c7acdf4f1a3b4d3d8f6409692df7d2e92b86b1be1753bdd8913e06952 SHA512 cff48ea1d1286c8b1fe971b00423ad64ef10c9b0555f0cae6e008efc07a21698d54d402fe1a0ac3161c0b5180e5ca0099a0a302fd7e7c5da0f227bdb7e2853ce |
23 |
DIST syncthing-1.0.0.tar.gz 10601948 BLAKE2B f9b509b78850efb315e33afff49f8468e3ea97a4aac90752e07851604960e817dbdcdb9824f2a6174b1f066ac277a119eea5aff75f6247a43652b70a5ff4f9af SHA512 79adbce03524665d02c1ca772fdf5aca68d9e41ee4bc02bcb9ac6ed0d8dca2fe8582139f52a0fe895ad5eb15c372d686277077ff884b67de1d45419e19407603 |
24 |
+DIST syncthing-1.0.1.tar.gz 7114455 BLAKE2B 71c80afaab5a546551e8e72e63272ab277df33645d4de19005376de599d8fe0bad9d4a1e7758321d116f8c46cd73067a770f641a0c736ad678a09579716f44a8 SHA512 7f9fd48e00fae2f0913eb9eeddadaad1d5d7559164a24020706e70411f8ec43420192c4c9422699be6faa1641a382d5b8627038ca9a5dad38ee0e189970efbb7 |
25 |
|
26 |
diff --git a/net-p2p/syncthing/syncthing-1.0.1.ebuild b/net-p2p/syncthing/syncthing-1.0.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..e49e912c31e |
29 |
--- /dev/null |
30 |
+++ b/net-p2p/syncthing/syncthing-1.0.1.ebuild |
31 |
@@ -0,0 +1,92 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+EGO_PN="github.com/${PN}/${PN}" |
38 |
+ |
39 |
+inherit golang-vcs-snapshot systemd user |
40 |
+ |
41 |
+DESCRIPTION="Open Source Continuous File Synchronization" |
42 |
+HOMEPAGE="https://syncthing.net" |
43 |
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="MPL-2.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~arm ~x86" |
48 |
+IUSE="selinux tools" |
49 |
+ |
50 |
+RDEPEND="selinux? ( sec-policy/selinux-syncthing )" |
51 |
+ |
52 |
+DOCS=( README.md AUTHORS CONTRIBUTING.md ) |
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 the relay server |
60 |
+ enewgroup strelaysrv |
61 |
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv |
62 |
+ # and his home folder |
63 |
+ keepdir /var/lib/strelaysrv |
64 |
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv |
65 |
+ fi |
66 |
+} |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ default |
70 |
+ sed -i \ |
71 |
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \ |
72 |
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ |
73 |
+ || die |
74 |
+} |
75 |
+ |
76 |
+src_compile() { |
77 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
78 |
+ cd src/${EGO_PN} || die |
79 |
+ go run build.go -version "v${PV}" -no-upgrade install \ |
80 |
+ $(usex tools "all" "") || die "build failed" |
81 |
+} |
82 |
+ |
83 |
+src_test() { |
84 |
+ cd src/${EGO_PN} || die |
85 |
+ go run build.go test || die "test failed" |
86 |
+} |
87 |
+ |
88 |
+src_install() { |
89 |
+ pushd src/${EGO_PN} >& /dev/null || die |
90 |
+ doman man/*.[157] |
91 |
+ einstalldocs |
92 |
+ |
93 |
+ dobin bin/syncthing |
94 |
+ if use tools ; then |
95 |
+ exeinto /usr/libexec/syncthing |
96 |
+ local exe |
97 |
+ for exe in bin/* ; do |
98 |
+ [[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}" |
99 |
+ done |
100 |
+ fi |
101 |
+ popd >& /dev/null || die |
102 |
+ |
103 |
+ # openrc and systemd service files |
104 |
+ systemd_dounit src/${EGO_PN}/etc/linux-systemd/system/${PN}{@,-resume}.service |
105 |
+ systemd_douserunit src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
106 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
107 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
108 |
+ |
109 |
+ keepdir /var/{lib,log}/${PN} |
110 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
111 |
+ insinto /etc/logrotate.d |
112 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
113 |
+ |
114 |
+ if use tools ; then |
115 |
+ # openrc and systemd service files |
116 |
+ systemd_dounit src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service |
117 |
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv |
118 |
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv |
119 |
+ |
120 |
+ insinto /etc/logrotate.d |
121 |
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv |
122 |
+ fi |
123 |
+} |