1 |
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
inherit pax-utils readme.gentoo-r1 systemd tmpfiles unpacker
|
7 |
7 |
|
8 |
8 |
QA_PREBUILT="usr/bin/rslsync"
|
9 |
|
BASE_URI="http://download-cdn.resilio.com/${PV}/Debian/${PN}_${PV}-1_@arch@.deb"
|
|
9 |
BASE_URI="https://download-cdn.resilio.com/${PV}/Debian/${PN}_${PV}-1_@arch@.deb"
|
10 |
10 |
|
11 |
11 |
DESCRIPTION="Resilient, fast and scalable file synchronization tool"
|
12 |
|
HOMEPAGE="https://resilio.com/"
|
13 |
|
SRC_URI="
|
14 |
|
amd64? ( ${BASE_URI/@arch@/amd64} )
|
15 |
|
x86? ( ${BASE_URI/@arch@/i386} )
|
16 |
|
"
|
17 |
|
S="${WORKDIR}"
|
|
12 |
HOMEPAGE="https://www.resilio.com"
|
|
13 |
SRC_URI="amd64? ( ${BASE_URI/@arch@/amd64} )
|
|
14 |
arm? ( ${BASE_URI/@arch@/armhf} )
|
|
15 |
arm64? ( ${BASE_URI/@arch@/arm64} )
|
|
16 |
x86? ( ${BASE_URI/@arch@/i386} )"
|
18 |
17 |
|
19 |
18 |
LICENSE="all-rights-reserved"
|
20 |
19 |
SLOT="0"
|
21 |
20 |
KEYWORDS="~amd64 ~x86"
|
|
21 |
IUSE=""
|
22 |
22 |
RESTRICT="bindist mirror"
|
23 |
23 |
|
24 |
|
DEPEND="
|
25 |
|
acct-group/rslsync
|
|
24 |
RDEPEND="acct-group/rslsync
|
26 |
25 |
acct-user/rslsync
|
27 |
|
"
|
|
26 |
virtual/libcrypt:="
|
|
27 |
DEPEND="${RDEPEND}"
|
28 |
28 |
|
29 |
|
RDEPEND="
|
30 |
|
${DEPEND}
|
31 |
|
|| (
|
32 |
|
sys-libs/libxcrypt[compat]
|
33 |
|
sys-libs/glibc[crypt(+)]
|
34 |
|
)"
|
|
29 |
S="${WORKDIR}"
|
35 |
30 |
|
36 |
31 |
DOC_CONTENTS="You may need to review /etc/resilio-sync/config.json\\n
|
37 |
32 |
Default metadata path is /var/lib/resilio-sync/.sync\\n
|
... | ... | |
60 |
55 |
readme.gentoo_create_doc
|
61 |
56 |
|
62 |
57 |
# Generate sample config, uncomment config directives and change values
|
63 |
|
insopts -orslsync -grslsync -m0644
|
|
58 |
insopts -o rslsync -g rslsync -m 0644
|
64 |
59 |
insinto /etc/resilio-sync
|
65 |
60 |
newins - config.json < <("${ED}"/usr/bin/rslsync --dump-sample-config | \
|
66 |
61 |
sed \
|
... | ... | |
70 |
65 |
-e "/pid_file/s|resilio/resilio|resilio-sync/resilio-sync|g" \
|
71 |
66 |
|| die "sed failed for config.json" )
|
72 |
67 |
|
73 |
|
diropts -orslsync -grslsync -m0700
|
74 |
|
keepdir /etc/resilio-sync /var/lib/resilio-sync/.sync /var/log/resilio-sync
|
|
68 |
diropts -o rslsync -g rslsync -m 0700
|
|
69 |
keepdir /etc/resilio-sync /var/lib/resilio-sync/ \
|
|
70 |
/var/lib/resilio-sync/.sync /var/log/resilio-sync
|
75 |
71 |
}
|
76 |
72 |
|
77 |
73 |
pkg_postinst() {
|