public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Eric Joldasov" <bratishkaerik@getgoogleoff.me>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-p2p/yggdrasil-go/
Date: Mon, 28 Oct 2024 22:48:26 +0000 (UTC)	[thread overview]
Message-ID: <1730155671.d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a.bratishkaerik@gentoo> (raw)

commit:     d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a
Author:     Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net>
AuthorDate: Mon Oct 28 22:47:51 2024 +0000
Commit:     Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me>
CommitDate: Mon Oct 28 22:47:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d8e6c2d0

net-p2p/yggdrasil-go: sync 9999 with 0.5.9

Signed-off-by: Eric Joldasov <bratishkaerik <AT> landless-city.net>

 net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild | 52 ++++++++++++++++++---------
 1 file changed, 35 insertions(+), 17 deletions(-)

diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
index 3b6bce73c..285b8c048 100644
--- a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
+++ b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
@@ -1,26 +1,36 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit fcaps git-r3 go-module linux-info systemd
-
-EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go"
+inherit fcaps go-module linux-info systemd
 
 DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network"
 HOMEPAGE="https://yggdrasil-network.github.io/"
 
+if [[ ${PV} == 9999 ]]; then
+	EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go"
+	inherit git-r3
+else
+	SRC_URI="
+		https://github.com/yggdrasil-network/yggdrasil-go/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+		https://codeberg.org/BratishkaErik/distfiles/releases/download/yggdrasil-go-${PV}/yggdrasil-go-${PV}-vendor.tar.xz
+	"
+	KEYWORDS="~amd64 ~arm64"
+fi
+
 LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB"
 SLOT="0"
 
+RESTRICT="mirror"
+
+BDEPEND=">=dev-lang/go-1.23"
 DEPEND="
 	acct-user/yggdrasil
 	acct-group/yggdrasil
 "
 
-BDEPEND=">=dev-lang/go-1.21"
-
-DOCS=( README.md CHANGELOG.md )
+DOCS=( "README.md" "CHANGELOG.md" )
 
 FILECAPS=(
 	cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil"
@@ -30,24 +40,32 @@ CONFIG_CHECK="~TUN"
 ERROR_TUN="Your kernel lacks TUN support."
 
 src_unpack() {
-	git-r3_src_unpack
-	go-module_live_vendor
+	if [[ ${PV} == 9999 ]]; then
+		git-r3_src_unpack
+		go-module_live_vendor
+	fi
+	go-module_src_unpack
 }
 
 src_compile() {
 	GOFLAGS+=" -mod=vendor -trimpath"
 
-	local ver_config="github.com/yggdrasil-network/yggdrasil-go/src/version"
-
-	local custom_name_version_flags="-X ${ver_config}.buildName=${PN}"
-	custom_name_version_flags+=" -X ${ver_config}.buildVersion=git-${EGIT_VERSION}"
+	local src="github.com/yggdrasil-network/yggdrasil-go/src/version"
+	local name version
+	if [[ ${PV} == 9999 ]]; then
+		chmod +x ./contrib/semver/{name,version}.sh || die
+		name="$(./contrib/semver/name.sh || die)"
+		version="$(./contrib/semver/version.sh || die)"
+	else
+		name="yggdrasil"
+		version="v${PV}"
+	fi
+	local custom_name_version_flags="-X ${src}.buildName=${name} -X ${src}.buildVersion=${version}"
 
-	local GO_LDFLAGS
-	GO_LDFLAGS="-s -linkmode external -extldflags \"${LDFLAGS}\" ${custom_name_version_flags}"
+	local go_ldflags="-s -linkmode external -extldflags \"${LDFLAGS}\" ${custom_name_version_flags}"
 
-	local cmd
 	for cmd in yggdrasil{,ctl}; do
-		ego build ${GOFLAGS} "-ldflags=${GO_LDFLAGS}" ./cmd/"${cmd}"
+		ego build ${GOFLAGS} -ldflags="${go_ldflags}" ./cmd/${cmd}
 	done
 }
 


             reply	other threads:[~2024-10-28 22:48 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 22:48 Eric Joldasov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-03 14:56 [gentoo-commits] repo/proj/guru:dev commit in: net-p2p/yggdrasil-go/ Sergey Alirzaev
2025-02-06 10:29 Eric Joldasov
2025-02-05  6:14 Eric Joldasov
2025-02-05  6:14 Eric Joldasov
2024-11-28 18:32 Eric Joldasov
2024-10-28 22:48 Eric Joldasov
2024-10-28 22:48 Eric Joldasov
2024-08-10 12:57 Eric Joldasov
2024-08-10 12:57 Eric Joldasov
2024-08-01 19:19 Eric Joldasov
2024-07-31 19:59 Eric Joldasov
2024-04-08 13:15 David Roman
2024-02-20  5:28 Eric Joldasov
2024-02-14  3:52 Eric Joldasov
2024-02-13 17:35 Eric Joldasov
2023-12-04 14:35 Eric Joldasov
2023-11-29 14:11 Eric Joldasov
2023-11-17 15:32 Eric Joldasov
2023-11-09 17:11 Eric Joldasov
2023-11-01 18:47 Eric Joldasov
2022-12-07  2:38 Eric Joldasov
2022-11-13 13:03 Eric Joldasov
2022-11-13 13:03 Eric Joldasov
2022-11-06  3:29 Eric Joldasov
2022-10-27 12:55 Eric Joldasov
2022-10-21 13:28 Eric Joldasov
2022-08-09 20:26 Eric Joldasov
2022-08-09 19:52 Eric Joldasov
2022-07-10  9:42 Eric Joldasov
2022-03-26 15:28 Eric Joldasov
2022-03-26 15:17 Eric Joldasov
2022-03-26 15:17 Eric Joldasov
2021-09-25 17:14 [gentoo-commits] repo/proj/guru:master " Arthur Zamarin
2021-09-25 16:59 ` [gentoo-commits] repo/proj/guru:dev " Arthur Zamarin
2021-09-25  4:55 Leonardo Hernandez
2020-12-26 22:11 Theo Anderson
2020-04-26 22:39 Alessandro Barbieri
2020-04-02 14:17 William Wennerström
2020-03-19 11:19 William Wennerström
2020-03-15 18:50 William Wennerström
2020-03-15 18:38 William Wennerström

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=1730155671.d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a.bratishkaerik@gentoo \
    --to=bratishkaerik@getgoogleoff.me \
    --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