public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/resilio-sync/
Date: Mon, 06 Oct 2025 21:33:42 +0000 (UTC)	[thread overview]
Message-ID: <1759786381.99ee5d2fbdbc149da2b9f46c69f66bea9d16bb15.sam@gentoo> (raw)

commit:     99ee5d2fbdbc149da2b9f46c69f66bea9d16bb15
Author:     Itai Ferber <itai <AT> itaiferber <DOT> net>
AuthorDate: Mon Oct  6 20:49:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct  6 21:33:01 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99ee5d2f

net-p2p/resilio-sync: live-template ebuild

Now that `-9999` uses live-downloading, it's worth refactoring it as a
live template to base future versions off of; replaces `3.1.1.1075` with
this template.

Signed-off-by: Itai Ferber <itai <AT> itaiferber.net>
Part-of: https://github.com/gentoo/gentoo/pull/44075
Closes: https://github.com/gentoo/gentoo/pull/44075
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../resilio-sync/resilio-sync-3.1.1.1075.ebuild    | 41 +++++++++++++++++-----
 net-p2p/resilio-sync/resilio-sync-9999.ebuild      | 40 ++++++++++++++-------
 2 files changed, 60 insertions(+), 21 deletions(-)

diff --git a/net-p2p/resilio-sync/resilio-sync-3.1.1.1075.ebuild b/net-p2p/resilio-sync/resilio-sync-3.1.1.1075.ebuild
index d1580bc23246..5015be931c7f 100644
--- a/net-p2p/resilio-sync/resilio-sync-3.1.1.1075.ebuild
+++ b/net-p2p/resilio-sync/resilio-sync-3.1.1.1075.ebuild
@@ -3,21 +3,26 @@
 
 EAPI=8
 
-inherit pax-utils readme.gentoo-r1 systemd tmpfiles
-
-BASE_URI="https://download-cdn.resilio.com/${PV}/linux/@arch@/0/${PN}_@arch@.tar.gz -> ${P}_@arch@.tar.gz"
+inherit edo pax-utils readme.gentoo-r1 systemd tmpfiles
 
 DESCRIPTION="Resilient, fast and scalable file synchronization tool"
 HOMEPAGE="https://www.resilio.com"
-SRC_URI="
-	amd64? ( ${BASE_URI//@arch@/x64} )
-	arm64? ( ${BASE_URI//@arch@/arm64} )
-"
+
+if [[ ${PV} == 9999 ]]; then
+	BDEPEND="net-misc/wget"
+	PROPERTIES="live"
+else
+	BASE_URI="https://download-cdn.resilio.com/${PV}/linux/@arch@/0/${PN}_@arch@.tar.gz -> ${P}_@arch@.tar.gz"
+	SRC_URI="
+		amd64? ( ${BASE_URI//@arch@/x64} )
+		arm64? ( ${BASE_URI//@arch@/arm64} )
+	"
+	KEYWORDS="-* ~amd64 ~arm64"
+fi
 
 S="${WORKDIR}"
 LICENSE="all-rights-reserved"
 SLOT="0"
-KEYWORDS="-* ~amd64 ~arm64"
 
 RESTRICT="bindist mirror"
 
@@ -33,6 +38,26 @@ DOC_CONTENTS="You may need to review /etc/resilio-sync/config.json\\n
 Default metadata path is /var/lib/resilio-sync/.sync\\n
 Default web-gui URL is http://localhost:8888/\\n\\n"
 
+src_unpack() {
+	if [[ ${PV} == 9999 ]]; then
+		local base_uri="https://download-cdn.resilio.com/stable/linux/@arch@/0/${PN}_@arch@.tar.gz"
+		local uri
+		if use amd64; then
+			uri="${base_uri//@arch@/x64}"
+		elif use arm64; then
+			uri="${base_uri//@arch@/arm64}"
+		else
+			die "arch not supported"
+		fi
+
+		local dest="${T}/${PN}.tar.gz"
+		edo wget -O "${dest}" "${uri}"
+		unpack "${dest}"
+	else
+		default
+	fi
+}
+
 src_install() {
 	dobin rslsync
 	pax-mark m "${ED}"/usr/bin/rslsync

diff --git a/net-p2p/resilio-sync/resilio-sync-9999.ebuild b/net-p2p/resilio-sync/resilio-sync-9999.ebuild
index 3a929672f728..5015be931c7f 100644
--- a/net-p2p/resilio-sync/resilio-sync-9999.ebuild
+++ b/net-p2p/resilio-sync/resilio-sync-9999.ebuild
@@ -8,11 +8,22 @@ inherit edo pax-utils readme.gentoo-r1 systemd tmpfiles
 DESCRIPTION="Resilient, fast and scalable file synchronization tool"
 HOMEPAGE="https://www.resilio.com"
 
+if [[ ${PV} == 9999 ]]; then
+	BDEPEND="net-misc/wget"
+	PROPERTIES="live"
+else
+	BASE_URI="https://download-cdn.resilio.com/${PV}/linux/@arch@/0/${PN}_@arch@.tar.gz -> ${P}_@arch@.tar.gz"
+	SRC_URI="
+		amd64? ( ${BASE_URI//@arch@/x64} )
+		arm64? ( ${BASE_URI//@arch@/arm64} )
+	"
+	KEYWORDS="-* ~amd64 ~arm64"
+fi
+
 S="${WORKDIR}"
 LICENSE="all-rights-reserved"
 SLOT="0"
 
-PROPERTIES="live"
 RESTRICT="bindist mirror"
 
 RDEPEND="
@@ -20,7 +31,6 @@ RDEPEND="
 	acct-user/rslsync
 	virtual/libcrypt:=
 "
-BDEPEND="net-misc/wget"
 
 QA_PREBUILT="usr/bin/rslsync"
 
@@ -29,19 +39,23 @@ Default metadata path is /var/lib/resilio-sync/.sync\\n
 Default web-gui URL is http://localhost:8888/\\n\\n"
 
 src_unpack() {
-	local base_uri="https://download-cdn.resilio.com/stable/linux/@arch@/0/${PN}_@arch@.tar.gz"
-	local uri
-	if use amd64; then
-		uri="${base_uri//@arch@/x64}"
-	elif use arm64; then
-		uri="${base_uri//@arch@/arm64}"
+	if [[ ${PV} == 9999 ]]; then
+		local base_uri="https://download-cdn.resilio.com/stable/linux/@arch@/0/${PN}_@arch@.tar.gz"
+		local uri
+		if use amd64; then
+			uri="${base_uri//@arch@/x64}"
+		elif use arm64; then
+			uri="${base_uri//@arch@/arm64}"
+		else
+			die "arch not supported"
+		fi
+
+		local dest="${T}/${PN}.tar.gz"
+		edo wget -O "${dest}" "${uri}"
+		unpack "${dest}"
 	else
-		die "arch not supported"
+		default
 	fi
-
-	local dest="${T}/${PN}.tar.gz"
-	edo wget -O "${dest}" "${uri}" || die
-	unpack "${dest}"
 }
 
 src_install() {


             reply	other threads:[~2025-10-06 21:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 21:33 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-06 21:33 [gentoo-commits] repo/gentoo:master commit in: net-p2p/resilio-sync/ Sam James
2025-10-06  0:40 Sam James
2025-10-06  0:40 Sam James
2025-10-06  0:40 Sam James
2025-10-06  0:40 Sam James
2025-10-06  0:40 Sam James
2024-08-10  6:58 Joonas Niilola
2024-08-01 16:23 Andreas Sturmlechner
2024-01-23 20:26 Andreas K. Hüttel
2022-09-05 12:37 Joonas Niilola
2022-09-05 12:37 Joonas Niilola
2022-09-05 12:37 Joonas Niilola
2022-09-05 12:37 Joonas Niilola
2022-01-15 11:33 Joonas Niilola
2021-11-19 17:45 Sam James
2021-07-11 21:23 Conrad Kostecki
2021-07-11 21:23 Conrad Kostecki
2021-05-09 23:04 Andreas Sturmlechner
2019-12-08 10:08 Joonas Niilola
2019-06-17 12:22 Michał Górny
2019-03-15 22:42 Patrice Clement
2019-03-15 22:42 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1759786381.99ee5d2fbdbc149da2b9f46c69f66bea9d16bb15.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox