1 |
commit: 2f387aaca5575b698e9e5e38cce55f78014ddc36 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 11 21:08:01 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 11 21:18:27 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f387aac |
7 |
|
8 |
net-p2p/resilio-sync: migrate to GLEP 81 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/781455 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
net-p2p/resilio-sync/resilio-sync-2.6.3-r2.ebuild | 80 +++++++++++++++++++++++ |
15 |
1 file changed, 80 insertions(+) |
16 |
|
17 |
diff --git a/net-p2p/resilio-sync/resilio-sync-2.6.3-r2.ebuild b/net-p2p/resilio-sync/resilio-sync-2.6.3-r2.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..cf39bd118bf |
20 |
--- /dev/null |
21 |
+++ b/net-p2p/resilio-sync/resilio-sync-2.6.3-r2.ebuild |
22 |
@@ -0,0 +1,80 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit pax-utils readme.gentoo-r1 systemd tmpfiles unpacker |
29 |
+ |
30 |
+QA_PREBUILT="usr/bin/rslsync" |
31 |
+BASE_URI="http://download-cdn.resilio.com/${PV}/Debian/${PN}_${PV}-1_@arch@.deb" |
32 |
+ |
33 |
+DESCRIPTION="Resilient, fast and scalable file synchronization tool" |
34 |
+HOMEPAGE="https://resilio.com/" |
35 |
+SRC_URI=" |
36 |
+ amd64? ( ${BASE_URI/@arch@/amd64} ) |
37 |
+ x86? ( ${BASE_URI/@arch@/i386} ) |
38 |
+" |
39 |
+S="${WORKDIR}" |
40 |
+ |
41 |
+LICENSE="all-rights-reserved" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
+RESTRICT="bindist mirror" |
45 |
+ |
46 |
+DEPEND=" |
47 |
+ acct-group/rslsync |
48 |
+ acct-user/rslsync |
49 |
+" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ ${DEPEND} |
53 |
+ || ( |
54 |
+ sys-libs/glibc[crypt(+)] |
55 |
+ sys-libs/libxcrypt[compat] |
56 |
+ )" |
57 |
+ |
58 |
+DOC_CONTENTS="You may need to review /etc/resilio-sync/config.json\\n |
59 |
+Default metadata path is /var/lib/resilio-sync/.sync\\n |
60 |
+Default web-gui URL is http://localhost:8888/\\n\\n" |
61 |
+ |
62 |
+src_unpack() { |
63 |
+ unpacker_src_unpack |
64 |
+ |
65 |
+ unpack usr/share/man/man1/resilio-sync.1.gz |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ dobin usr/bin/rslsync |
70 |
+ pax-mark m "${ED}"/usr/bin/rslsync |
71 |
+ |
72 |
+ doman resilio-sync.1 |
73 |
+ |
74 |
+ newinitd "${FILESDIR}"/resilio-sync.initd resilio-sync |
75 |
+ newconfd "${FILESDIR}"/resilio-sync.confd resilio-sync |
76 |
+ newinitd "${FILESDIR}"/resilio-sync-user.initd resilio-sync-user |
77 |
+ newconfd "${FILESDIR}"/resilio-sync-user.confd resilio-sync-user |
78 |
+ systemd_dounit "${FILESDIR}"/resilio-sync.service |
79 |
+ systemd_douserunit "${FILESDIR}"/resilio-sync-user.service |
80 |
+ newtmpfiles "${FILESDIR}"/resilio-sync.tmpfile resilio-sync.conf |
81 |
+ |
82 |
+ readme.gentoo_create_doc |
83 |
+ |
84 |
+ # Generate sample config, uncomment config directives and change values |
85 |
+ insopts -orslsync -grslsync -m0644 |
86 |
+ insinto /etc/resilio-sync |
87 |
+ newins - config.json < <("${ED}"/usr/bin/rslsync --dump-sample-config | \ |
88 |
+ sed \ |
89 |
+ -e "/storage_path/s|//| |g" \ |
90 |
+ -e "/pid_file/s|//| |g" \ |
91 |
+ -e "/storage_path/s|/home/user/.sync|/var/lib/resilio-sync/.sync|g" \ |
92 |
+ -e "/pid_file/s|resilio/resilio|resilio-sync/resilio-sync|g" \ |
93 |
+ || die "sed failed for config.json" ) |
94 |
+ |
95 |
+ diropts -orslsync -grslsync -m0700 |
96 |
+ keepdir /etc/resilio-sync /var/lib/resilio-sync/.sync /var/log/resilio-sync |
97 |
+} |
98 |
+ |
99 |
+pkg_postinst() { |
100 |
+ tmpfiles_process resilio-sync.conf |
101 |
+ readme.gentoo_print_elog |
102 |
+} |